#2210 closed defect (duplicate)

PowerPC: dl01 and dl02 tests don't link

Reported by: Sebastian Huber Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: blocker Keywords: libdl psim powerpc
Cc: Blocked By:
Blocking:

Description

There seems to be a problem with the small-data area:

gmake[3]: Entering directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl01'
powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -o dl01.pre.exe init.o dl-load.o dl-tar.o
powerpc-rtems4.11-nm -g -n dl01.pre.exe > dl01.pre.num
powerpc-rtems4.11-size dl01.pre.exe

text data bss dec hex filename

231008 2112 16544064 16777184 ffffe0 dl01.pre.exe

cp dl01.pre.exe dl01.pre.ralf
rm dl01.pre.ralf
mv dl01.pre.exe dl01.pre
rtems-syms -e -c "-meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs" -o dl-sym.o dl01.pre
powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e \

-o dl01.exe init.o dl-load.o dl-tar.o dl-sym.o

/opt/rtems-4.11/lib64/gcc/powerpc-rtems4.11/4.9.2/../../../../powerpc-rtems4.11/bin/ld: dl-sym.o: the target (rtemsrtl_base_globals_size) of a R_PPC_SDAREL16 relocation is in the wrong output section (.rodata)
dl-sym.o: In function `rtems_rtl_base_global_syms_init':
rld--8eeaaa.c:(.text+0x6): relocation truncated to fit: R_PPC_SDAREL16 against `rtemsrtl_base_globals_size'
collect2: error: ld returned 1 exit status
gmake[3]: [dl01.exe] Error 1 (ignored)
gmake[3]: Leaving directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl01'
gmake[2]: Leaving directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl01'
Making all in dl02
gmake[2]: Entering directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl02'
gmake all-am
gmake[3]: Entering directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl02'
powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -o dl02.pre.exe init.o dl-load.o dl-tar.o
powerpc-rtems4.11-nm -g -n dl02.pre.exe > dl02.pre.num
powerpc-rtems4.11-size dl02.pre.exe

text data bss dec hex filename

241336 2104 16533760 16777200 fffff0 dl02.pre.exe

cp dl02.pre.exe dl02.pre.ralf
rm dl02.pre.ralf
mv dl02.pre.exe dl02.pre
rtems-syms -e -c "-meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs" -o dl-sym.o dl02.pre
powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e \

-o dl02.exe init.o dl-load.o dl-tar.o dl-sym.o

/opt/rtems-4.11/lib64/gcc/powerpc-rtems4.11/4.9.2/../../../../powerpc-rtems4.11/bin/ld: dl-sym.o: the target (rtemsrtl_base_globals_size) of a R_PPC_SDAREL16 relocation is in the wrong output section (.rodata)
dl-sym.o: In function `rtems_rtl_base_global_syms_init':
rld--tfeaaa.c:(.text+0x6): relocation truncated to fit: R_PPC_SDAREL16 against `rtemsrtl_base_globals_size'
collect2: error: ld returned 1 exit status
gmake[3]: [dl02.exe] Error 1 (ignored)
gmake[3]: Leaving directory `/scratch/git-build/b-psim/powerpc-rtems4.11/c/psim/testsuites/libtests/dl02'

Change History (4)

comment:1 Changed on Dec 8, 2014 at 3:05:22 PM by Joel Sherrill

FWIW I didn't check the logs for all but a large number of PowerPC BSPs fail to linkthis test.

brs5l brs6l br_uid dp2 gwlcfm hsc_cm01 icecube mbx821_001
mbx821_002b mbx821_002 mbx860_001b mbx860_002 mbx860_005b
mbx860_1b mpc5566evb mpc5566evb_spe mpc5643l_dpu mpc5643l_evb
mpc5668g mpc5674f_ecu508_app mpc5674f_ecu508_boot mpc5674fevb
mpc5674fevb_spe mpc5674f_rsm6 mpc8260ads mpc8309som mpc8313erdb
mpc8349eamds pghplus phycore_mpc5554 pm520_cr825 pm520_ze30 psim
qoriq_core_0 qoriq_core_1 qoriq_p1020rdb t32mppc tqm8xx_stk8xx
virtex

comment:2 Changed on Dec 8, 2014 at 9:24:56 PM by Chris Johns

This looks like the PowerPC needs something specific in the symbol table. The ASM header may need conditional support for the PowerPC plus something specific to the -msdata option.

comment:3 Changed on Dec 8, 2014 at 9:57:36 PM by Chris Johns

Keywords: libdl psim powerpc added

comment:4 Changed on Mar 4, 2015 at 6:52:12 PM by Joel Sherrill

Resolution: duplicate
Status: newclosed

This is described better in 2258. Closing this as duplicate.

Note: See TracTickets for help on using tickets.