]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[ARC] don't force _init/_fini as DT_INIT/DT_FINI.
authorClaudiu Zissulescu <claziss@gmail.com>
Sat, 9 Feb 2019 10:07:42 +0000 (11:07 +0100)
committerClaudiu Zissulescu <claziss@gmail.com>
Mon, 25 Mar 2019 10:31:44 +0000 (11:31 +0100)
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 <vgupta@synopsys.com>

           * elf32-arc.c: Delete init_str, fini_str

ld/
    2019-02-01  Vineet Gupta <vgupta@synopsys.com>

           * emultempl/arclinux.em : Delete special INIT/FINI handling.

bfd/ChangeLog
bfd/elf32-arc.c
ld/ChangeLog
ld/emultempl/arclinux.em

index 6f39735d7b62825181aa39cec47fb8f71f74337b..6433e46e4254e7c081226d2464027455d8e8b721 100644 (file)
@@ -1,3 +1,12 @@
+2019-03-25  Claudiu Zissulescu  <claziss@synopsys.com>
+
+       Backport from mainline
+       2019-02-09  Vineet Gupta  <vgupta@synopsys.com>
+       * elf32-arc (INIT_SYM_STRING): Delete.
+       (FINI_SYM_STRING): Likewise.
+       (init_str): Likewise.
+       (fini_str): Likewise.
+
 2019-03-18  Alan Modra  <amodra@gmail.com>
 
        PR 24355
index c7469ded8acfbfc8938197b7f3f89987b52add58..b86dd59a3bd1a2c62a8b126b53cb7fa04a193d12 100644 (file)
@@ -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; \
index 0f2af45c11e5b5e3819421c84dee244655560657..d719425ee6e2e4d1b17693bc84bbd4a54d1eb2a4 100644 (file)
@@ -1,3 +1,7 @@
+2019-02-09  Vineet Gupta  <vgupta@synopsys.com>
+
+       * emultempl/arclinux.em: Delete special INIT/FINI handling.
+
 2019-03-01  Andreas Krebbel  <krebbel@linux.ibm.com>
 
        Backport from mainline
index 3163712fbd0ed86caa0f34c34f7f592aff2ee7ee..48b6a616db7460d5ebc7bd651d514a4d6fab9dde 100644 (file)
@@ -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.
 #
 # This file is sourced from elf32.em, and defines extra arc-linux
 # specific routines.
 #
-cat >>e${EMULATION_NAME}.c <<EOF
-extern char * init_str;
-extern char * fini_str;
-EOF
-
-PARSE_AND_LIST_PROLOGUE='
-#define OPTION_INIT 300+1
-#define OPTION_FINI (OPTION_INIT+1)
-'
-PARSE_AND_LIST_LONGOPTS='
-  /* PE options */
-  { "init", required_argument, NULL, OPTION_INIT },
-  { "fini", required_argument, NULL, OPTION_FINI },
-'
-
-# FIXME: Should set PARSE_AND_LIST_OPTIONS to provide a short description
-# of the options.
-
-PARSE_AND_LIST_ARGS_CASES='
-    case OPTION_FINI:
-      fini_str = optarg;
-      break;
-
-    case OPTION_INIT:
-      init_str = optarg;
-      break;
-'