#2576 closed defect (fixed)

arm/lpc176x: linker script update (add KEEP() sections)

Reported by: Joel Sherrill Owned by: Joel Sherrill <joel@…>
Priority: normal Milestone: 5.1
Component: arch/arm Version: 5
Severity: normal Keywords: function sections, KEEP
Cc: Blocked By:
Blocking:

Description

This BSP's linker script does not include KEEP() directives and thus cannot have per-function and per-data element section support enabled.

The preferred solution is to convert the BSP to use a shared base linker script. The acceptable solution is to add the proper KEEP directives to the existing linker script(s).

Shared linker scripts for the arm, m68k, and sparc have the proper KEEP sections and can serve as examples.

Change History (8)

comment:1 Changed on Feb 6, 2016 at 4:26:47 PM by Joel Sherrill <joel@…>

In e41d8ce5a764d57952102009ff1c5e5ace69a1c8/rtems:

arm/.../lpc1768_embed.cfg: Disable per function sections

updates #2576.

comment:2 Changed on Mar 17, 2016 at 8:12:25 PM by Marcos Diaz

I looked into the linkerscript and it uses the shared for all arm's, which uses KEEP directives. Then I tested this BSP enabling the flags, and samples work ok:

hello.exe :
section size addr
.start 772 0
.text 79136 776
.rodata 4152 79936
.vector 1256 268435456
.data 1656 268436712
.bss 5656 268438368

With flags:
hello.exe :
section size addr
.start 772 0
.text 61424 776
.rodata 3512 62224
.vector 1256 268435456
.data 1604 268436712
.bss 5592 268438336

And the same for the other samples.

comment:3 Changed on Mar 22, 2016 at 2:51:04 PM by Marcos Diaz

I suggest to apply the linker flags and deprecate this bug

comment:4 Changed on Mar 22, 2016 at 3:10:51 PM by Joel Sherrill <joel@…>

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

In 1a738edb39d462b9d99be4537782934f5ec56ca5/rtems:

lpc1768_mbed.cfg: Turn on per function sections

Closes #2576.

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

Milestone: 4.124.12.0

comment:6 Changed on Oct 10, 2017 at 6:54:12 AM by Sebastian Huber

Component: bspsarch/arm

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

Milestone: 4.12.05.1

Milestone renamed

comment:8 Changed on Sep 14, 2018 at 7:03:46 PM by Joel Sherrill

Keywords: function sections KEEP added
Note: See TracTickets for help on using tickets.