[PATCH v1 1/4] cpukit/libdl: Use correct mask for reloc type

Kinsey Moore kinsey.moore at oarcorp.com
Thu Jan 12 22:54:53 UTC 2023


The mask 0xff is used by ELF32 while ELF64 uses 0xffffffff. These are
automatically selected based on the build type when using ELF_R_TYPE().
---
 cpukit/libdl/rtl-rap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-rap.c b/cpukit/libdl/rtl-rap.c
index 64ee2947a3..f8e2b18f43 100644
--- a/cpukit/libdl/rtl-rap.c
+++ b/cpukit/libdl/rtl-rap.c
@@ -336,7 +336,7 @@ rtems_rtl_rap_relocate (rtems_rtl_rap* rap, rtems_rtl_obj* obj)
                 " addend=%" PRIu32 "\n",
                 r, info, offset, addend);
 
-      type = info & 0xff;
+      type = ELF_R_TYPE(info);
 
       if ((info & (1 << 31)) == 0)
       {
-- 
2.30.2



More information about the devel mailing list