h8300 on testsuite and -wrap
Joel Sherrill
joel.sherrill@oarcorp.com
Sat Sep 27 18:27:00 GMT 2008
Jeff Law wrote:
> Joel Sherrill wrote:
>
>> Hi,
>>
>> I am trying to run the gcc test suite on h8300-rtems
>> and getting lots of failures which look like this:
>>
>>
>>
>> /home/joel/work-gnat/svn/b-gcc1-h8300/gcc/xgcc
>> -B/home/joel/work-gnat/svn/b-gcc1-h8300/gcc/
>> /home/joel/work-gnat/svn/gcc/gcc/testsuite/gcc.c-torture/execute/20001031-1.c
>> gcc_tg.o -w -O1 -DSTACK_SIZE=2048 -mh -mint32
>> -B/home/joel/work-gnat/svn/bsp-install/h8300-rtems4.10/h8sim/lib/
>> -specs bsp_specs -qrtems
>> /home/joel/work-gnat/svn/b-gcc1-h8300/rtems_gcc_main.o -Wl,-wrap,exit
>> -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o
>> /home/joel/work-gnat/svn/b-gcc1-h8300/gcc/testsuite/gcc/20001031-1.x1
>> -L /home/joel/work-gnat/svn/install/h8300-rtems4.10/lib/h8300h/ -lm
>> /tmp/ccKBizhg.o: In function `.L20':
>> 20001031-1.c:(.text+0x99): undefined reference to `__wrap__exit'
>> gcc_tg.o: In function `___wrap_exit':
>> testglue.c:(.text+0x173): undefined reference to `___real_exit'
>> gcc_tg.o: In function `.L9':
>> testglue.c:(.text+0x23d): undefined reference to `___real__exit'
>> gcc_tg.o: In function `___wrap_abort':
>> testglue.c:(.text+0x271): undefined reference to `___real_abort'
>> gcc_tg.o: In function `___wrap_main':
>> testglue.c:(.text+0x2b9): undefined reference to `___real_main'
>> testglue.c:(.text+0x2c1): undefined reference to `__wrap__exit'
>> /home/joel/work-gnat/svn/bsp-install/h8300-rtems4.10/h8sim/lib/librtemscpu.a(libposix_a-psignal.o):
>> In function `_POSIX_signals_Abnormal_termination_handler':
>> /home/joel/work-gnat/svn//rtems/c/src/../../cpukit/posix/src/psignal.c:41:
>> undefined reference to `__wrap__exit'
>>
>> The arguments passed to ld look correct but looking
>> into this with a simple h8300-elf-gcc build, I noticed
>> that since gcc puts a leading _ on the symbols, you
>> have to pass "-Wl,-wrap,_malloc" NOT -Wl,-wrap,malloc".
>>
>> Where is the leading underscore not getting dealt with
>> so the wrap functions get invoked.
>>
>> FWIW I didn't see any h8300-elf results since last year
>> and wonder if this is a known issue.
>>
> I ran into it as well when testing IRA. Hell if I can remember what I
> did to fix it though....
>
I hacked. Turned on -DUNDERSCORES and added a method
to add the name they expected and call the right one.
Results aren't great but they are current now.
http://gcc.gnu.org/ml/gcc-testresults/2008-09/msg02213.html
> jeff
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Gcc
mailing list