This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: cris-elf enable-initfini-array fallout partial fix, PR 19935


(I missed that there was a bugzilla PR for this one.)
Heads-up to SH maintainer; that port has IIRC exactly the same
problem and it seems exactly the same solution applies.

The other part being a somewhat trivial patch in newlib; see
libgloss/{aarch64,aarch}/crt0.S for how to "connect the pipes".
Don't forget to #include "newlib.h" in your crt0.S if you care
to conditionalize on HAVE_INITFINI_ARRAY, though I see the
newlib initfini-array-check doesn't detect the linger script
change; it says "yes" even with a linker-script where
initfini-array is "disabled".

Without this, you'll have to roll your own
newlib/libc/misc/{init,fini}.c as the C identifier would have
one _ less than that code.

ld:
	PR binutils/19935
	Fix long-standing buglet and fallout from now-default initfini-array.
	* emulparams/criself.sh (USER_LABEL_PREFIX): Define.
	(OTHER_READONLY_SECTIONS, ENTRY): Delete now-redunant defines.

diff --git a/ld/emulparams/criself.sh b/ld/emulparams/criself.sh
index dcddc0f..5ea9284 100644
--- a/ld/emulparams/criself.sh
+++ b/ld/emulparams/criself.sh
@@ -8,7 +8,7 @@ OUTPUT_FORMAT="elf32-us-cris"
 NO_REL_RELOCS=yes
 ARCH=cris
 MAXPAGESIZE=32
-ENTRY=__start
+USER_LABEL_PREFIX=_
 EMBEDDED=yes
 ALIGNMENT=32
 TEXT_START_ADDR=0
@@ -53,7 +53,6 @@ OTHER_BSS_END_SYMBOLS='
  __Sbss = ADDR (.bss);
  PROVIDE (_bss_start = __Sbss);
 '
-OTHER_END_SYMBOLS='PROVIDE (__end = .);'
 
 INIT_ADDR='ALIGN (2)'
 

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]