[PRU] :ld: Fix __init/fini_array_start symbol name

Message ID 20190506202431.6988-1-dimitar@dinux.eu
State New
Headers show
Series
  • [PRU] :ld: Fix __init/fini_array_start symbol name
Related show

Commit Message

Dimitar Dimitrov May 6, 2019, 8:24 p.m.
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(-)

-- 
2.11.0

Comments

Nick Clifton May 8, 2019, 1:57 p.m. | #1
Hi Dimitar,

> ld/ChangeLog:

> 2019-05-06  Dimitar Dimitrov  <dimitar@dinux.eu>

> 

> 	* scripttempl/pru.sc (__init_array_begin, __init_array_begin): Rename.


Approved - please apply.

Cheers
  Nick
Dimitar Dimitrov May 8, 2019, 7:07 p.m. | #2
On сряда, 8 май 2019 г. 14:57:28 EEST Nick Clifton wrote:
> Hi Dimitar,

> 

> > ld/ChangeLog:

> > 2019-05-06  Dimitar Dimitrov  <dimitar@dinux.eu>

> > 

> > 	* scripttempl/pru.sc (__init_array_begin, __init_array_begin): Rename.

> 

> Approved - please apply.

> 

> Cheers

>   Nick


I don't have write access for binutils. Can you help to merge it?

Thanks,
Dimitar
Nick Clifton May 9, 2019, 9:29 a.m. | #3
Hi Dimitar,

> I don't have write access for binutils. Can you help to merge it?


I have done so.

Would you like to have write access ?  If so please could you fill 
out the form at the URL below.  You can use my email address as the
approver.

https://sourceware.org/cgi-bin/pdw/ps_form.cgi

Cheers
  Nick
Dimitar Dimitrov May 9, 2019, 8:56 p.m. | #4
On четвъртък, 9 май 2019 г. 10:29:02 EEST Nick Clifton wrote:
> Hi Dimitar,

> 

> > I don't have write access for binutils. Can you help to merge it?

> 

> I have done so.

> 

> Would you like to have write access ?  If so please could you fill

> out the form at the URL below.  You can use my email address as the

> approver.

> 

> https://sourceware.org/cgi-bin/pdw/ps_form.cgi


I've been granted write access.

Thanks,
Dimitar

Patch

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 = . ; }