[rtems commit] bsps/sparc: Fix global construction/destruction
Sebastian Huber
sebh at rtems.org
Tue Mar 6 10:39:53 UTC 2018
Module: rtems
Branch: master
Commit: 4899759f73fd195500e149dd6bffbe418636c0de
Changeset: http://git.rtems.org/rtems/commit/?id=4899759f73fd195500e149dd6bffbe418636c0de
Author: Thanassis Tsiodras <Thanassis.Tsiodras at esa.int>
Date: Tue Mar 6 07:23:07 2018 +0100
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.
Update #3319.
---
c/src/lib/libbsp/sparc/shared/startup/linkcmds.base | 6 ++++--
1 file 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 b4e1c28..4c7750d 100644
--- a/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/sparc/shared/startup/linkcmds.base
@@ -88,11 +88,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*)
More information about the vc
mailing list