[RTEMS Project] #2612: R_ARM_GOT_BREL relocation type unsupported

RTEMS trac trac at rtems.org
Wed Feb 24 20:59:20 UTC 2016

#2612: R_ARM_GOT_BREL relocation type unsupported
 Reporter:  pggauvin     |       Owner:  chrisj
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:
Component:  libdl        |     Version:  4.11
 Severity:  normal       |  Resolution:
 Keywords:               |

Comment (by pggauvin):

 I'm glad you both caught that, it must have been leftover from porting our
 old Makefiles that were for Linux, and I just continued using it for the
 shared libraries.

 Here are instructions for the attachment:

 To generate code that causes the `dlopen` failure (omitting the override
 of `LIB_OPTS` will result in the test succeeding):
 make clean all LIB_OPTS=-fPIC

 Test with QEMU:
 qemu-system-arm -m 256M -M xilinx-zynq-a9 -serial null \
   -serial mon:stdio -nographic -no-reboot \
   -kernel ./libdl-global-var-test.exe

 One curiosity is that if the generated `lib.o` is loaded, rather than
 `lib.so`, there are unresolved symbols after the load. I haven't looked
 into why, but usually the plain object file is fine (the dl-01 test uses
 it, but also doesn't load global variables). This can be tested by
 changing line 15 of `libdl-global-var-test.c` to `#define LIB_FILE_NAME
 "/lib.o"`. The tar file loaded at run-time contains both files, so no
 other changes are necessary.

 Development environment (I forgot to include this in the original
 * RTEMS version: Branch "4.11", commit
 * RTEMS configure options: `--target=arm-rtems4.11 --enable-
 rtemsbsp="xilinx_zynq_a9_qemu xilinx_zynq_zedboard" --enable-tests=samples
 --enable-posix --prefix=/home/patrick/development/rtems/4.11 --disable-
 * `arm-rtems4.11-gcc --version`
 arm-rtems4.11-gcc (GCC) 4.9.3 20150626 (RTEMS 4.11, RSB
 aa3fdad01a0dbc3cbfd7c49e1ea07ff1a585c0b9 (HEAD, origin/4.11,
 4.11)-modified, Newlib

Ticket URL: <http://devel.rtems.org/ticket/2612#comment:8>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list