#2638 closed defect (fixed)

pc386: ld -r issue with per function sections

Reported by: Joel Sherrill Owned by: Joel Sherrill <joel@…>
Priority: normal Milestone: 5.1
Component: unspecified Version: 5
Severity: normal Keywords:
Cc: Blocked By:


The pc386 BSP has an issue with "ld -r" when function-sections is enabled which does not seem to occur on any other BSP. The same lines were added to the custom .cfg file as on other BSPs. It is unknown at this point whether this is an x86 specific "ld -r" issue or a pc386 build configuration issue.

Per-function-section linking is disabled until this is addressed.

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

Change History (5)

comment:1 Changed on Mar 10, 2016 at 11:08:44 PM by Chris Johns

I have seen patches from H,J Lu from Intel recently on binutils about -r. Maybe ask him.

comment:2 Changed on Mar 10, 2016 at 11:14:21 PM by Joel Sherrill

Good idea. I emailed binutils@ and hopefully we will get a hint.

comment:3 Changed on Mar 11, 2016 at 10:08:25 PM by Joel Sherrill <joel@…>

Owner: set to Joel Sherrill <joel@…>
Resolution: fixed
Status: newclosed

In 5e368e8441e21e484a09e0d743a5b6b934e45047/rtems:

pc386: Fix linker usage issues with -r and function sections

closes #2638.

comment:4 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber


comment:5 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber


Milestone renamed

Note: See TracTickets for help on using tickets.