* [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI
@ 2019-02-01 20:22 Vineet Gupta
2019-02-04 14:52 ` Claudiu Zissulescu
0 siblings, 1 reply; 5+ messages in thread
From: Vineet Gupta @ 2019-02-01 20:22 UTC (permalink / raw)
To: binutils
Cc: Claudiu Zissulescu, linux-snps-arc, cupertino.miranda, Vineet Gupta
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.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
bfd/ChangeLog | 4 ++++
bfd/elf32-arc.c | 9 ---------
ld/ChangeLog | 4 ++++
ld/emultempl/arclinux.em | 27 ---------------------------
4 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5547cd26b9bb..8fcf44e8d315 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-01 Vineet Gupta <vgupta@synopsys.com>
+
+ * elf32-arc.c: Delete init_str, fini_str.
+
2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
* elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index c7469ded8acf..1ced270f3b15 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -72,15 +72,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 5713b0020c64..647e343d21b5 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-01 Vineet Gupta <vgupta@synopsys.com>
+
+ * emultempl/arclinux.em : Delete special INIT/FINI handling.
+
2019-01-31 Alan Modra <amodra@gmail.com>
* NEWS: Mention -t change.
diff --git a/ld/emultempl/arclinux.em b/ld/emultempl/arclinux.em
index 3163712fbd0e..796c89085e34 100644
--- a/ld/emultempl/arclinux.em
+++ b/ld/emultempl/arclinux.em
@@ -23,30 +23,3 @@
# 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;
-'
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI
2019-02-01 20:22 [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI Vineet Gupta
@ 2019-02-04 14:52 ` Claudiu Zissulescu
2019-03-20 23:04 ` Vineet Gupta
2019-03-20 23:05 ` Vineet Gupta
0 siblings, 2 replies; 5+ messages in thread
From: Claudiu Zissulescu @ 2019-02-04 14:52 UTC (permalink / raw)
To: Vineet Gupta, binutils
Cc: Claudiu Zissulescu, linux-snps-arc, Cupertino Miranda, Vineet Gupta
Hi,
> 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.
>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
It looks good. I will push it asap. Thank you for your contribution,
Claudiu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI
2019-02-04 14:52 ` Claudiu Zissulescu
@ 2019-03-20 23:04 ` Vineet Gupta
2019-03-20 23:05 ` Vineet Gupta
1 sibling, 0 replies; 5+ messages in thread
From: Vineet Gupta @ 2019-03-20 23:04 UTC (permalink / raw)
To: Claudiu Zissulescu, binutils; +Cc: linux-snps-arc, Cupertino Miranda
Hi,
On 2/4/19 6:52 AM, Claudiu Zissulescu wrote:
> Hi,
>
>> 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.
>>
>> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
>
> It looks good. I will push it asap. Thank you for your contribution,
> Claudiu
Can this be backported to stable branches please !
Thx,
-Vineet
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI
2019-02-04 14:52 ` Claudiu Zissulescu
2019-03-20 23:04 ` Vineet Gupta
@ 2019-03-20 23:05 ` Vineet Gupta
1 sibling, 0 replies; 5+ messages in thread
From: Vineet Gupta @ 2019-03-20 23:05 UTC (permalink / raw)
To: Claudiu Zissulescu, binutils
Cc: Claudiu Zissulescu, linux-snps-arc, Cupertino Miranda
Hi Claudiu,
On 2/4/19 6:52 AM, Claudiu Zissulescu wrote:
> Hi,
>
>> 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.
>>
>> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
>
> It looks good. I will push it asap. Thank you for your contribution,
> Claudiu
Can this be stable backported please.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI.
@ 2019-03-25 10:40 Claudiu Zissulescu
0 siblings, 0 replies; 5+ messages in thread
From: Claudiu Zissulescu @ 2019-03-25 10:40 UTC (permalink / raw)
To: binutils; +Cc: fbedard, vineet.gupta1
Mainline backport:
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 | 9 +++++++++
bfd/elf32-arc.c | 10 ----------
ld/ChangeLog | 4 ++++
ld/emultempl/arclinux.em | 29 +----------------------------
4 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6f39735d7b..6433e46e42 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index c7469ded8a..b86dd59a3b 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 0f2af45c11..d719425ee6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/emultempl/arclinux.em b/ld/emultempl/arclinux.em
index 3163712fbd..48b6a616db 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 <<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;
-'
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-25 10:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01 20:22 [PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI Vineet Gupta
2019-02-04 14:52 ` Claudiu Zissulescu
2019-03-20 23:04 ` Vineet Gupta
2019-03-20 23:05 ` Vineet Gupta
2019-03-25 10:40 Claudiu Zissulescu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).