This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld conflict between -r and --gc-sections
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>, Chris Johns <chrisj at rtems dot org>
- Date: Thu, 10 Mar 2016 17:13:57 -0600
- Subject: ld conflict between -r and --gc-sections
- Authentication-results: sourceware.org; auth=none
Hi
I was trying to add per function sections on our x86 BSP linking.
This is the only target which I saw any issue mixing -r and
--gc-sections. Each of our BSPs has its own linker script so
there could be something amiss with this one.
i386-rtems4.12-gcc --pipe -B../../../../../.././lib/ -B../../../../../.././pc386/lib/ -specs bsp_specs -qrtems -mtune=i386 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -qnolinkcmds -nostdlib -r -Wl,--gc-sections -Wl,-Ttext,0x00100000 -o ne2000.rel ne2000_rel-ne2000.o
/data/home/joel/rtems-4.11-work/tools/4.12/bin/../lib/gcc/i386-rtems4.12/6.0.0/../../../../i386-rtems4.12/bin/ld: gc-sections requires either an entry or an undefined symbol
collect2: error: ld returned 1 exit status
Is this an x86 specific issue? Or is there something I
need to tweak in our linker script?
Any other ideas?
Thanks.
--
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 35806
Support Available (256) 722-9985