This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] [PRU]:ld: Fix __init/fini_array_start symbol name
- From: Dimitar Dimitrov <dimitar at dinux dot eu>
- To: binutils at sourceware dot org
- Cc: Dimitar Dimitrov <dimitar at dinux dot eu>
- Date: Mon, 6 May 2019 23:24:31 +0300
- Subject: [PATCH] [PRU]:ld: Fix __init/fini_array_start symbol name
The __init_array_begin and __fini_array_begin symbol names are a mistake.
There is no reason to deviate from the standard naming.
This patch fixes an ld-elf/pr24511 failure uncovered by:
commit a288c270991de1578ad28ac312120f4167347234
PR24511, nm should not mark symbols in .init_array as "t"
Note: I have fixed crt0 locally, because the newlib/libgloss port is not yet
merged mainline. I'll resubmit updated newlib patches once the GCC port is
accepted (hopefully soon).
ld/ChangeLog:
2019-05-06 Dimitar Dimitrov <dimitar@dinux.eu>
* scripttempl/pru.sc (__init_array_begin, __init_array_begin): Rename.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
ld/scripttempl/pru.sc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc
index 933a1f9690..9ef798082f 100644
--- a/ld/scripttempl/pru.sc
+++ b/ld/scripttempl/pru.sc
@@ -119,11 +119,11 @@ SECTIONS
/* CRT is prepared for constructor/destructor table to have
a "valid" NULL address. */
- ${CONSTRUCTING+ __init_array_begin = . ; }
+ ${CONSTRUCTING+ __init_array_start = . ; }
${CONSTRUCTING+ KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*)))}
${CONSTRUCTING+ KEEP (*(.init_array))}
${CONSTRUCTING+ __init_array_end = . ; }
- ${CONSTRUCTING+ __fini_array_begin = . ; }
+ ${CONSTRUCTING+ __fini_array_start = . ; }
${CONSTRUCTING+ KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*)))}
${CONSTRUCTING+ KEEP (*(.fini_array))}
${CONSTRUCTING+ __fini_array_end = . ; }
--
2.11.0