[RTEMS Project] #3883: Trace linker is broken on small-data area targets
RTEMS trac
trac at rtems.org
Tue Feb 25 08:17:11 UTC 2020
#3883: Trace linker is broken on small-data area targets
------------------------------+---------------------------
Reporter: Sebastian Huber | Owner: Needs Funding
Type: defect | Status: assigned
Priority: normal | Milestone: Indefinite
Component: tool | Version: 5
Severity: normal | Keywords:
Blocked By: | Blocking:
------------------------------+---------------------------
The trace linker generates some data, e.g. `__rtld_trace_names`. The
arrays are not declared in a header file as arrays of unspecified size.
So, in rtems-trace-buffer-vars.c the compiler assumes that the size one
weakly defined defaults reside in the small-data area. This leads to
linker errors with the strong definitions:
{{{
Waf: Entering directory `/scratch/git-rtems-examples/build/powerpc-
rtems5-qoriq_e6500_32'
[22/29] Processing rtrace: build/powerpc-
rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/init.c.6.o build/powerpc-
rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/fs-root-tar.c.6.o -> build
/powerpc-rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/fat_ramdisk.texe
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/lib64/gcc/powerpc-
rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /opt/rtems/5/powerpc-
rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): the
target (__rtld_trace_names) of a R_PPC_SDAREL16 relocation is in the wrong
output section (.data)
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/powerpc-
rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): in
function `rtems_trace_names':
/opt/rtems/5/bin/powerpc-rtems5-gcc: /home/EB/sebastian_h/git-
rtems-5/c/src/../../cpukit/libmisc/capture/rtems-trace-buffer-
vars.c:51:(.text.rtems_trace_names+0x2): relocation truncated to fit:
R_PPC_SDAREL16 against symbol `__rtld_trace_names' defined in
.data.__rtld_trace_names section in /tmp/ccu6uaaa.o
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/lib64/gcc/powerpc-
rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /opt/rtems/5/powerpc-
rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): the
target (__rtld_trace_signatures) of a R_PPC_SDAREL16 relocation is in the
wrong output section (.rodata)
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/powerpc-
rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): in
function `rtems_trace_signatures':
/opt/rtems/5/bin/powerpc-rtems5-gcc: /home/EB/sebastian_h/git-
rtems-5/c/src/../../cpukit/libmisc/capture/rtems-trace-buffer-
vars.c:81:(.text.rtems_trace_signatures+0x2): relocation truncated to fit:
R_PPC_SDAREL16 against symbol `__rtld_trace_signatures' defined in
.rodata.__rtld_trace_signatures section in /tmp/ccu6uaaa.o
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/3883>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list