#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 02/06/16 at 16:26:47 by Joel Sherrill <joel@…>
comment:2 Changed on 03/17/16 at 20:12:25 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 03/22/16 at 14:51:04 by Marcos Diaz
I suggest to apply the linker flags and deprecate this bug
comment:4 Changed on 03/22/16 at 15:10:51 by Joel Sherrill <joel@…>
Owner: | set to Joel Sherrill <joel@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 Changed on 05/11/17 at 07:31:02 by Sebastian Huber
Milestone: | 4.12 → 4.12.0 |
---|
comment:6 Changed on 10/10/17 at 06:54:12 by Sebastian Huber
Component: | bsps → arch/arm |
---|
comment:7 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
comment:8 Changed on 09/14/18 at 19:03:46 by Joel Sherrill
Keywords: | function sections KEEP added |
---|
In e41d8ce5a764d57952102009ff1c5e5ace69a1c8/rtems: