[rtems commit] cpukit/libdl: Use correct mask for reloc type

Joel Sherrill joel at rtems.org
Fri Jan 20 14:11:25 UTC 2023


Module:    rtems
Branch:    master
Commit:    df0de7810f714529df7dfe2b3d063c42ed4860df
Changeset: http://git.rtems.org/rtems/commit/?id=df0de7810f714529df7dfe2b3d063c42ed4860df

Author:    Kinsey Moore <kinsey.moore at oarcorp.com>
Date:      Thu Jan  5 13:45:21 2023 -0600

cpukit/libdl: Use correct mask for reloc type

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)
       {



More information about the vc mailing list