summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorThanassis Tsiodras <Thanassis.Tsiodras@esa.int>2018-03-06 07:23:07 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-08-12 14:47:59 +0200
commit63c6b06fd1cf051ea57a9b22c9986c8421b10446 (patch)
treea37b4e64a50e52b1b80ac119a15f81c2c2af4ba1 /c/src
parentleon,gr1553b: improve init check (diff)
downloadrtems-63c6b06fd1cf051ea57a9b22c9986c8421b10446.tar.bz2
bsps/sparc: Fix global construction/destruction
The KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) cannot be simplified to KEEP (*(SORT(.ctors*))) since .ctors < .ctors.* in lexicographical order. See spglobalcon02 test case. Close #3319.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/lib/libbsp/sparc/shared/startup/linkcmds.base6
1 files changed, 4 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base b/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
index 219a060572..c4a9b23002 100644
--- a/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
@@ -87,11 +87,13 @@ SECTIONS
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
- KEEP (*(SORT(.ctors*)))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
- KEEP (*(SORT(.dtors*)))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
_rodata_start = . ;
*(.rodata*)