From a0e90a73f0dc7e44c980ef5ea512eb7a3bd0cabc Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Sat, 9 Feb 2019 11:07:42 +0100 Subject: [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI. Recent gcc commit b4371b277f1e ("[ARC] Enable init_array support") inhibits DT_"INIT,FINI} in favor of DT_{INIT,FINI}ARRAY. Even prior to that, it seems ARC port is the only one with this special DT_INIT/FINI handling in linker emulation. Removing it doesn't seem to change any uClibc/glibc testsuite results, so this can RIP anyways. bfd/ 2019-02-01 Vineet Gupta * elf32-arc.c: Delete init_str, fini_str ld/ 2019-02-01 Vineet Gupta * emultempl/arclinux.em : Delete special INIT/FINI handling. --- bfd/ChangeLog | 7 +++++++ bfd/elf32-arc.c | 10 ---------- ld/ChangeLog | 4 ++++ ld/emultempl/arclinux.em | 29 +---------------------------- 4 files changed, 12 insertions(+), 38 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 882dcea82ca..833f7f9f38d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2019-02-09 Vineet Gupta + + * elf32-arc (INIT_SYM_STRING): Delete. + (FINI_SYM_STRING): Likewise. + (init_str): Likewise. + (fini_str): Likewise. + 2019-02-08 Alan Modra * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index c7469ded8ac..b86dd59a3bd 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -71,16 +71,6 @@ name_for_global_symbol (struct elf_link_hash_entry *h) } \ } - -/* The default symbols representing the init and fini dyn values. - TODO: Check what is the relation of those strings with arclinux.em - and DT_INIT. */ -#define INIT_SYM_STRING "_init" -#define FINI_SYM_STRING "_fini" - -char * init_str = INIT_SYM_STRING; -char * fini_str = FINI_SYM_STRING; - #define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \ case VALUE: \ return "R_" #TYPE; \ diff --git a/ld/ChangeLog b/ld/ChangeLog index a14291716b4..642cf561f98 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2019-02-09 Vineet Gupta + + * emultempl/arclinux.em: Delete special INIT/FINI handling. + 2019-02-07 Nick Clifton PR 24175 diff --git a/ld/emultempl/arclinux.em b/ld/emultempl/arclinux.em index 3163712fbd0..48b6a616db7 100644 --- a/ld/emultempl/arclinux.em +++ b/ld/emultempl/arclinux.em @@ -1,7 +1,7 @@ # This shell script emits a C file. -*- C -*- # Copyright (C) 2007-2019 Free Software Foundation, Inc. # -# Copyright 2008-2012 Synopsys Inc. +# Copyright 2008-2019 Synopsys Inc. # # This file is part of GLD, the Gnu Linker. # @@ -23,30 +23,3 @@ # This file is sourced from elf32.em, and defines extra arc-linux # specific routines. # -cat >>e${EMULATION_NAME}.c <