SHA256
1
0
forked from pool/binutils

- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8

* Includes fix for PR22983.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=272
This commit is contained in:
Richard Biener 2018-03-20 11:27:36 +00:00 committed by Git OBS Bridge
parent 6c3622185a
commit c0b27d2978
23 changed files with 195 additions and 54 deletions

View File

@ -1,8 +1,17 @@
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c310da6ed3..13ccbc5eb0 100644
index c310da6ed3..74d76dce05 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,109 @@
@@ -1,3 +1,118 @@
+2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master branch
+ 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/22983
+ * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
+ non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
+
+2018-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master branch
@ -645,10 +654,24 @@ index b3d4d599ed..8fa01405ac 100644
.opd entries. */
int non_overlapping_opd;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index e3751fa122..69cb5abbac 100644
index e3751fa122..6bb4e98ae6 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11618,6 +11618,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
@@ -586,7 +586,12 @@ bfd_elf_link_mark_dynamic_symbol (struct bfd_link_info *info,
|| (d != NULL
&& h->non_elf
&& (*d->match) (&d->head, NULL, h->root.root.string)))
- h->dynamic = 1;
+ {
+ h->dynamic = 1;
+ /* NB: If a symbol is made dynamic by --dynamic-list, it has
+ non-IR reference. */
+ h->root.non_ir_ref_dynamic = 1;
+ }
}
/* Record an assignment to a symbol made by a linker script. We need
@@ -11618,6 +11623,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
else
o->flags |= SEC_EXCLUDE;
}
@ -662,7 +685,7 @@ index e3751fa122..69cb5abbac 100644
}
/* Count up the number of relocations we will output for each output
@@ -12785,20 +12792,31 @@ _bfd_elf_gc_mark_hook (asection *sec,
@@ -12785,20 +12797,31 @@ _bfd_elf_gc_mark_hook (asection *sec,
return NULL;
}
@ -1063,7 +1086,7 @@ index 7a65f1755d..e1e20b45bc 100644
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/bfd/version.h b/bfd/version.h
index 3d00b319e8..4f5f353a54 100644
index 3d00b319e8..074f647679 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -16,7 +16,7 @@
@ -1071,7 +1094,7 @@ index 3d00b319e8..4f5f353a54 100644
In releases, the date is not included in either version strings or
sonames. */
-#define BFD_VERSION_DATE 20180127
+#define BFD_VERSION_DATE 20180319
+#define BFD_VERSION_DATE 20180320
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@
@ -43603,10 +43626,22 @@ index e3e9632c3d..e5bf189382 100644
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6337cd0cb6..6cea82b6ad 100644
index 6337cd0cb6..b266e2433f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,76 @@
@@ -1,3 +1,88 @@
+2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master branch
+ 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/22983
+ * testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
+ * testsuite/ld-plugin/pr22983.d: New file.
+ * testsuite/ld-plugin/pr22983.t: Likewise.
+ * testsuite/ld-plugin/pr22983a.c: Likewise.
+ * testsuite/ld-plugin/pr22983b.c: Likewise.
+
+2018-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master branch
@ -43683,7 +43718,7 @@ index 6337cd0cb6..6cea82b6ad 100644
2018-01-27 Nick Clifton <nickc@redhat.com>
This is the 2.30 release:
@@ -108,7 +181,7 @@
@@ -108,7 +193,7 @@
2018-01-16 Nick Clifton <nickc@redhat.com>
@ -44218,6 +44253,90 @@ index ea0cf2e4ad..baabf55779 100644
+ .byte 0x62
+ .byte 0x63
+ .byte 0x64
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 896f453def..4bd2ada0ea 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -564,6 +564,16 @@ run_ld_link_exec_tests $lto_run_tests
if { [is_elf_format] } {
run_ld_link_exec_tests $lto_run_elf_tests
+ run_cc_link_tests [list \
+ [list \
+ "Build pr22983" \
+ "-Wl,--dynamic-list,pr22983.t" \
+ "-flto" \
+ {pr22983a.c pr22983b.c} \
+ {{readelf {--dyn-syms --wide} pr22983.d}} \
+ "pr22983" \
+ ] \
+ ]
}
if { [is_elf_format] && [check_lto_shared_available] } {
diff --git a/ld/testsuite/ld-plugin/pr22983.d b/ld/testsuite/ld-plugin/pr22983.d
new file mode 100644
index 0000000000..af1d710d3f
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr22983.d
@@ -0,0 +1,9 @@
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size Type +Bind +Vis +Ndx Name
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +var_attr_used_enabled
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +var_attr_used_disabled
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +func_attr_used_enabled
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +func_attr_used_disabled
+#...
diff --git a/ld/testsuite/ld-plugin/pr22983.t b/ld/testsuite/ld-plugin/pr22983.t
new file mode 100644
index 0000000000..ca31f10965
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr22983.t
@@ -0,0 +1,6 @@
+{
+var_attr_used_disabled;
+var_attr_used_enabled;
+func_attr_used_disabled;
+func_attr_used_enabled;
+};
diff --git a/ld/testsuite/ld-plugin/pr22983a.c b/ld/testsuite/ld-plugin/pr22983a.c
new file mode 100644
index 0000000000..283f263bff
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr22983a.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+int func_attr_used_disabled(int val);
+int func_attr_used_enabled(int val);
+extern int var_attr_used_enabled;
+extern int var_attr_used_disabled;
+
+int main(int argc, const char **argv){
+ printf("%d\n", var_attr_used_disabled);
+ printf("%d\n", var_attr_used_enabled);
+ printf("%d\n", func_attr_used_disabled(1));
+ printf("%d\n", func_attr_used_enabled(1));
+ return 0;
+}
diff --git a/ld/testsuite/ld-plugin/pr22983b.c b/ld/testsuite/ld-plugin/pr22983b.c
new file mode 100644
index 0000000000..1b66ed889f
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr22983b.c
@@ -0,0 +1,10 @@
+int func_attr_used_disabled(int val){
+ return val + 1;
+}
+__attribute__((used))
+int func_attr_used_enabled(int val){
+ return val + 1;
+}
+__attribute__((used))
+int var_attr_used_enabled = 0b0101010101;
+int var_attr_used_disabled = 0b0101010101;
diff --git a/ld/testsuite/ld-powerpc/elfv2exe.d b/ld/testsuite/ld-powerpc/elfv2exe.d
index fa5b622827..77bf6e2568 100644
--- a/ld/testsuite/ld-powerpc/elfv2exe.d

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de

View File

@ -1,9 +1,10 @@
-------------------------------------------------------------------
Mon Mar 19 15:12:19 UTC 2018 - rguenther@suse.com
Tue Mar 20 11:26:23 UTC 2018 - rguenther@suse.com
- Update binutils-2.30-branch.diff: 2.30 branch @cd2de6083def3
- Update binutils-2.30-branch.diff: 2.30 branch @7c78c26eefbb8
* Includes more complete fix for PR20882.
* Includes fix for PR22836. [boo#1085784]
* Includes fix for PR22983.
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de