SHA256
1
0
forked from pool/binutils

(swo#19807) (bnc#970239)

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=211
This commit is contained in:
Richard Biener 2016-03-18 07:58:33 +00:00 committed by Git OBS Bridge
parent e860120c9a
commit c6440e42ce
22 changed files with 250 additions and 85 deletions

View File

@ -1,8 +1,20 @@
diff --git a/bfd/ChangeLog b/bfd/ChangeLog diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e860c3e..59e49fa 100644 index e860c3e..4741b19 100644
--- a/bfd/ChangeLog --- a/bfd/ChangeLog
+++ b/bfd/ChangeLog +++ b/bfd/ChangeLog
@@ -1,3 +1,144 @@ @@ -1,3 +1,156 @@
+2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master
+ 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19827
+ * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
+ locally in PIE.
+ (elf_i386_relocate_section): Likewise.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+ (elf_x86_64_relocate_section): Likewise.
+
+2016-03-15 H.J. Lu <hongjiu.lu@intel.com> +2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
+ +
+ Backport from master + Backport from master
@ -147,7 +159,7 @@ index e860c3e..59e49fa 100644
2016-01-25 Tristan Gingold <gingold@adacore.com> 2016-01-25 Tristan Gingold <gingold@adacore.com>
* version.m4: Bump version to 2.26 * version.m4: Bump version to 2.26
@@ -119,7 +260,7 @@ @@ -119,7 +272,7 @@
* configure: Regenerate. * configure: Regenerate.
2015-11-11 Alan Modra <amodra@gmail.com> 2015-11-11 Alan Modra <amodra@gmail.com>
@ -156,7 +168,7 @@ index e860c3e..59e49fa 100644
* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA. * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
(ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA. (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
@@ -179,8 +320,8 @@ @@ -179,8 +332,8 @@
2015-10-29 Catherine Moore <clm@codesourcery.com> 2015-10-29 Catherine Moore <clm@codesourcery.com>
@ -167,7 +179,7 @@ index e860c3e..59e49fa 100644
2015-10-29 Ed Schouten <ed@nuxi.nl> 2015-10-29 Ed Schouten <ed@nuxi.nl>
@@ -232,7 +373,7 @@ @@ -232,7 +385,7 @@
* bfd-in2.h: Regenerate. * bfd-in2.h: Regenerate.
2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com> 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
@ -176,7 +188,7 @@ index e860c3e..59e49fa 100644
* bfd-in2.h: Regenerate. * bfd-in2.h: Regenerate.
* bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
@@ -1225,115 +1366,115 @@ @@ -1225,115 +1378,115 @@
2015-08-18 H.J. Lu <hongjiu.lu@intel.com> 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
@ -399,7 +411,7 @@ index e860c3e..59e49fa 100644
2015-08-18 Alan Modra <amodra@gmail.com> 2015-08-18 Alan Modra <amodra@gmail.com>
@@ -1387,7 +1528,7 @@ @@ -1387,7 +1540,7 @@
2015-08-11 Jiong Wang <jiong.wang@arm.com> 2015-08-11 Jiong Wang <jiong.wang@arm.com>
@ -408,7 +420,7 @@ index e860c3e..59e49fa 100644
Loose the check for symbol from ABS section. Loose the check for symbol from ABS section.
(elfNN_aarch64_size_stubs): Pass sym_sec. (elfNN_aarch64_size_stubs): Pass sym_sec.
@@ -1688,10 +1829,10 @@ @@ -1688,10 +1841,10 @@
2015-07-10 H.J. Lu <hongjiu.lu@intel.com> 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
@ -423,7 +435,7 @@ index e860c3e..59e49fa 100644
2015-07-09 Catherine Moore <clm@codesourcery.com> 2015-07-09 Catherine Moore <clm@codesourcery.com>
@@ -2004,7 +2145,6 @@ @@ -2004,7 +2157,6 @@
Bernd Schmidt <bernds@codesourcery.com> Bernd Schmidt <bernds@codesourcery.com>
Paul Brook <paul@codesourcery.com> Paul Brook <paul@codesourcery.com>
@ -431,7 +443,7 @@ index e860c3e..59e49fa 100644
* bfd-in2.h: Regenerated. * bfd-in2.h: Regenerated.
* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define. * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
(COMPACT_EH_CANT_UNWIND_OPCODE): Define. (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
@@ -2913,7 +3053,7 @@ @@ -2913,7 +3065,7 @@
2015-03-18 H.J. Lu <hongjiu.lu@intel.com> 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
* compress.c (bfd_compress_section_contents): Make it static. * compress.c (bfd_compress_section_contents): Make it static.
@ -440,7 +452,7 @@ index e860c3e..59e49fa 100644
2015-03-18 Eric Youngdale <eyoungdale@ptc.com> 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
@@ -3062,8 +3202,8 @@ @@ -3062,8 +3214,8 @@
2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com> 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
@ -451,7 +463,7 @@ index e860c3e..59e49fa 100644
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com> 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
@@ -3534,7 +3674,7 @@ @@ -3534,7 +3686,7 @@
is weak or pointer_equality_needed is FALSE. is weak or pointer_equality_needed is FALSE.
* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
@ -825,10 +837,20 @@ index ad40914..3fc1f57 100644
} }
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 300839b..0b76153 100644 index 300839b..79f339e 100644
--- a/bfd/elf32-i386.c --- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c
@@ -2490,12 +2490,14 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) @@ -1830,7 +1830,8 @@ do_size:
&& (sec->flags & SEC_ALLOC) != 0
&& (r_type != R_386_PC32
|| (h != NULL
- && (! SYMBOLIC_BIND (info, h)
+ && (! (bfd_link_pie (info)
+ || SYMBOLIC_BIND (info, h))
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -2490,12 +2491,14 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
} }
else else
{ {
@ -843,7 +865,7 @@ index 300839b..0b76153 100644
h->plt.offset = (bfd_vma) -1; h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0; h->needs_plt = 0;
} }
@@ -4016,10 +4018,12 @@ elf_i386_relocate_section (bfd *output_bfd, @@ -4016,10 +4019,12 @@ elf_i386_relocate_section (bfd *output_bfd,
/* It is relative to .got.plt section. */ /* It is relative to .got.plt section. */
if (h->got.offset != (bfd_vma) -1) if (h->got.offset != (bfd_vma) -1)
@ -858,7 +880,18 @@ index 300839b..0b76153 100644
else else
/* Use GOTPLT entry. */ /* Use GOTPLT entry. */
relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4; relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4;
@@ -5355,19 +5359,23 @@ elf_i386_reloc_type_class (const struct bfd_link_info *info, @@ -4285,8 +4290,8 @@ r_386_got32:
else if (h != NULL
&& h->dynindx != -1
&& (r_type == R_386_PC32
- || !bfd_link_pic (info)
- || !SYMBOLIC_BIND (info, h)
+ || !(bfd_link_executable (info)
+ || SYMBOLIC_BIND (info, h))
|| !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
@@ -5355,19 +5360,23 @@ elf_i386_reloc_type_class (const struct bfd_link_info *info,
bfd *abfd = info->output_bfd; bfd *abfd = info->output_bfd;
const struct elf_backend_data *bed = get_elf_backend_data (abfd); const struct elf_backend_data *bed = get_elf_backend_data (abfd);
struct elf_link_hash_table *htab = elf_hash_table (info); struct elf_link_hash_table *htab = elf_hash_table (info);
@ -1052,10 +1085,20 @@ index 162862c..ffe23e6 100644
} }
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 63957bb..8c98cea 100644 index 63957bb..e80fd20 100644
--- a/bfd/elf64-x86-64.c --- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c
@@ -2723,12 +2723,14 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) @@ -2029,7 +2029,8 @@ do_size:
&& (sec->flags & SEC_ALLOC) != 0
&& (! IS_X86_64_PCREL_TYPE (r_type)
|| (h != NULL
- && (! SYMBOLIC_BIND (info, h)
+ && (! (bfd_link_pie (info)
+ || SYMBOLIC_BIND (info, h))
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -2723,12 +2724,14 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
} }
else else
{ {
@ -1070,7 +1113,7 @@ index 63957bb..8c98cea 100644
h->plt.offset = (bfd_vma) -1; h->plt.offset = (bfd_vma) -1;
h->needs_plt = 0; h->needs_plt = 0;
} }
@@ -3190,35 +3192,43 @@ elf_x86_64_convert_load (bfd *abfd, asection *sec, @@ -3190,35 +3193,43 @@ elf_x86_64_convert_load (bfd *abfd, asection *sec,
} }
else else
{ {
@ -1129,7 +1172,18 @@ index 63957bb..8c98cea 100644
> 0xffffffff) > 0xffffffff)
continue; continue;
} }
@@ -5728,19 +5738,23 @@ elf_x86_64_reloc_type_class (const struct bfd_link_info *info, @@ -4631,8 +4642,8 @@ direct:
else if (h != NULL
&& h->dynindx != -1
&& (IS_X86_64_PCREL_TYPE (r_type)
- || ! bfd_link_pic (info)
- || ! SYMBOLIC_BIND (info, h)
+ || !(bfd_link_executable (info)
+ || SYMBOLIC_BIND (info, h))
|| ! h->def_regular))
{
outrel.r_info = htab->r_info (h->dynindx, r_type);
@@ -5728,19 +5739,23 @@ elf_x86_64_reloc_type_class (const struct bfd_link_info *info,
bfd *abfd = info->output_bfd; bfd *abfd = info->output_bfd;
const struct elf_backend_data *bed = get_elf_backend_data (abfd); const struct elf_backend_data *bed = get_elf_backend_data (abfd);
struct elf_x86_64_link_hash_table *htab = elf_x86_64_hash_table (info); struct elf_x86_64_link_hash_table *htab = elf_x86_64_hash_table (info);
@ -1276,12 +1330,12 @@ index 59c51cc..d83dc1b 100644
value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
signed_addend, weak_undef_p); signed_addend, weak_undef_p);
diff --git a/bfd/version.h b/bfd/version.h diff --git a/bfd/version.h b/bfd/version.h
index ed51cc9..d8528f6 100644 index ed51cc9..3ee7efe 100644
--- a/bfd/version.h --- a/bfd/version.h
+++ b/bfd/version.h +++ b/bfd/version.h
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20160125 -#define BFD_VERSION_DATE 20160125
+#define BFD_VERSION_DATE 20160317 +#define BFD_VERSION_DATE 20160318
#define BFD_VERSION @bfd_version@ #define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@ #define REPORT_BUGS_TO @report_bugs_to@
@ -4032,10 +4086,25 @@ index 0aee194..87d4653 100644
2005-07-27 Jan Beulich <jbeulich@novell.com> 2005-07-27 Jan Beulich <jbeulich@novell.com>
diff --git a/ld/ChangeLog b/ld/ChangeLog diff --git a/ld/ChangeLog b/ld/ChangeLog
index 75fd708..7cd6599 100644 index 75fd708..e74db8c 100644
--- a/ld/ChangeLog --- a/ld/ChangeLog
+++ b/ld/ChangeLog +++ b/ld/ChangeLog
@@ -1,3 +1,179 @@ @@ -1,3 +1,194 @@
+2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from master
+ 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/19827
+ * testsuite/ld-i386/i386.exp: Run PR ld/19827 tests.
+ * testsuite/ld-x86-64/x86-64.exp: Likewise.
+ * testsuite/ld-i386/pr19827.rd: New file.
+ * testsuite/ld-i386/pr19827a.S: Likewise.
+ * testsuite/ld-i386/pr19827b.S: Likewise.
+ * testsuite/ld-x86-64/pr19827.rd: Likewise.
+ * testsuite/ld-x86-64/pr19827a.S: Likewise.
+ * testsuite/ld-x86-64/pr19827b.S: Likewise.
+
+2016-03-15 H.J. Lu <hongjiu.lu@intel.com> +2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
+ +
+ Backport from master + Backport from master
@ -4215,7 +4284,7 @@ index 75fd708..7cd6599 100644
2016-01-25 Tristan Gingold <gingold@adacore.com> 2016-01-25 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate. * configure: Regenerate.
@@ -89,7 +265,7 @@ @@ -89,7 +280,7 @@
decide placement. decide placement.
2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com> 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
@ -4224,7 +4293,7 @@ index 75fd708..7cd6599 100644
* ld.texinfo: Add description of the STM32L4xx erratum * ld.texinfo: Add description of the STM32L4xx erratum
workaround. workaround.
@@ -129,7 +305,7 @@ @@ -129,7 +320,7 @@
2015-10-22 H.J. Lu <hongjiu.lu@intel.com> 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
@ -4233,7 +4302,7 @@ index 75fd708..7cd6599 100644
* emulparams/call_nop.sh: New file. * emulparams/call_nop.sh: New file.
* emulparams/elf_i386_be.sh: Source * emulparams/elf_i386_be.sh: Source
${srcdir}/emulparams/call_nop.sh. ${srcdir}/emulparams/call_nop.sh.
@@ -165,7 +341,7 @@ @@ -165,7 +356,7 @@
2015-10-15 Simon Dardis <Simon.Dardis@imgtec.com> 2015-10-15 Simon Dardis <Simon.Dardis@imgtec.com>
@ -4242,7 +4311,7 @@ index 75fd708..7cd6599 100644
(exp_fold_tree_1): Here. Cope with ternary operator in (exp_fold_tree_1): Here. Cope with ternary operator in
assignments. Use new helper. assignments. Use new helper.
@@ -308,7 +484,7 @@ @@ -308,7 +499,7 @@
2015-09-09 James Bowman <james.bowman@ftdichip.com> 2015-09-09 James Bowman <james.bowman@ftdichip.com>
* scripttempl/ft32.sc: default linker script RAM and * scripttempl/ft32.sc: default linker script RAM and
@ -4251,7 +4320,7 @@ index 75fd708..7cd6599 100644
2015-09-09 Nick Clifton <nickc@redhat.com> 2015-09-09 Nick Clifton <nickc@redhat.com>
@@ -359,58 +535,58 @@ @@ -359,58 +550,58 @@
2015-08-18 H.J. Lu <hongjiu.lu@intel.com> 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
@ -5482,10 +5551,25 @@ index a6d51c6..7e4c9b1 100644
subl $20, %esp subl $20, %esp
leal __FUNCTION__.1866@GOTOFF(%ebx), %esi leal __FUNCTION__.1866@GOTOFF(%ebx), %esi
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index fb1d3ea..0cc9645 100644 index fb1d3ea..1916c24 100644
--- a/ld/testsuite/ld-i386/i386.exp --- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp
@@ -319,6 +319,7 @@ run_dump_test "load5a" @@ -195,6 +195,14 @@ set i386tests {
"--32" {pr17709a.s} {} "libpr17709.so"}
{"PR ld/17709 (2)" "-melf_i386 tmpdir/libpr17709.so" ""
"--32" {pr17709b.s} {{readelf -r pr17709.rd}} "pr17709"}
+ {"Build pr19827a.o" "" ""
+ "--32" { pr19827a.S }}
+ {"Build pr19827b.so" "-melf_i386 -shared" ""
+ "--32" { pr19827b.S } {} "pr19827b.so"}
+ {"Build pr19827" "-melf_i386 -pie tmpdir/pr19827a.o tmpdir/pr19827b.so" ""
+ "--32" { dummy.s } {{readelf {-rW} pr19827.rd}} "pr19827"}
+ {"Build pr19827.so" "-melf_i386 -shared -Bsymbolic" ""
+ "--32" { pr19827a.S } {{readelf {-rW} pr19827.rd}} "pr19827.so"}
}
# So as to avoid rewriting every last test case here in a nacl variant,
@@ -319,6 +327,7 @@ run_dump_test "load5a"
run_dump_test "load5b" run_dump_test "load5b"
run_dump_test "load6" run_dump_test "load6"
run_dump_test "pr19175" run_dump_test "pr19175"
@ -5493,7 +5577,7 @@ index fb1d3ea..0cc9645 100644
if { !([istarget "i?86-*-linux*"] if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"] || [istarget "i?86-*-gnu*"]
@@ -357,7 +358,7 @@ if { [isnative] @@ -357,7 +366,7 @@ if { [isnative]
[list \ [list \
"Build libplt-main1.a" \ "Build libplt-main1.a" \
"" \ "" \
@ -5502,7 +5586,7 @@ index fb1d3ea..0cc9645 100644
{ plt-main1.c } \ { plt-main1.c } \
{{readelf {-Wr} plt-main1.rd}} \ {{readelf {-Wr} plt-main1.rd}} \
"libplt-main1.a" \ "libplt-main1.a" \
@@ -365,7 +366,7 @@ if { [isnative] @@ -365,7 +374,7 @@ if { [isnative]
[list \ [list \
"Build libplt-main2.a" \ "Build libplt-main2.a" \
"" \ "" \
@ -5511,7 +5595,7 @@ index fb1d3ea..0cc9645 100644
{ plt-main2.c } \ { plt-main2.c } \
{{readelf {-Wr} plt-main2.rd}} \ {{readelf {-Wr} plt-main2.rd}} \
"libplt-main2.a" \ "libplt-main2.a" \
@@ -373,7 +374,7 @@ if { [isnative] @@ -373,7 +382,7 @@ if { [isnative]
[list \ [list \
"Build libplt-main3.a" \ "Build libplt-main3.a" \
"" \ "" \
@ -5520,7 +5604,7 @@ index fb1d3ea..0cc9645 100644
{ plt-main3.c } \ { plt-main3.c } \
{{readelf {-Wr} plt-main3.rd}} \ {{readelf {-Wr} plt-main3.rd}} \
"libplt-main3.a" \ "libplt-main3.a" \
@@ -381,7 +382,7 @@ if { [isnative] @@ -381,7 +390,7 @@ if { [isnative]
[list \ [list \
"Build libplt-main4.a" \ "Build libplt-main4.a" \
"" \ "" \
@ -5529,7 +5613,7 @@ index fb1d3ea..0cc9645 100644
{ plt-main4.c } \ { plt-main4.c } \
{{readelf {-Wr} plt-main4.rd}} \ {{readelf {-Wr} plt-main4.rd}} \
"libplt-main4.a" \ "libplt-main4.a" \
@@ -535,7 +536,7 @@ if { [isnative] @@ -535,7 +544,7 @@ if { [isnative]
[list \ [list \
"Build gotpc1" \ "Build gotpc1" \
"tmpdir/got1d.so" \ "tmpdir/got1d.so" \
@ -5674,6 +5758,39 @@ index 0000000..1d85926
+ +
+ .section ".xyzzy_ptr","aw",%progbits + .section ".xyzzy_ptr","aw",%progbits
+ .dc.a xyzzy + .dc.a xyzzy
diff --git a/ld/testsuite/ld-i386/pr19827.rd b/ld/testsuite/ld-i386/pr19827.rd
new file mode 100644
index 0000000..5d2a885
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19827.rd
@@ -0,0 +1,5 @@
+#readelf: -r --wide
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset Info Type Sym. Value Symbol's Name
+[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE +
diff --git a/ld/testsuite/ld-i386/pr19827a.S b/ld/testsuite/ld-i386/pr19827a.S
new file mode 100644
index 0000000..cdf1d4b
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19827a.S
@@ -0,0 +1,8 @@
+ .text
+ .global _start
+_start:
+ .dc.a foo
+ .data
+ .globl foo
+foo:
+ .byte 0
diff --git a/ld/testsuite/ld-i386/pr19827b.S b/ld/testsuite/ld-i386/pr19827b.S
new file mode 100644
index 0000000..bb46e1d
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr19827b.S
@@ -0,0 +1,2 @@
+ .data
+ .dc.a foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
index 53ccd5a..ae75487 100644 index 53ccd5a..ae75487 100644
--- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d --- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
@ -5922,11 +6039,59 @@ index 0000000..1d85926
+ +
+ .section ".xyzzy_ptr","aw",%progbits + .section ".xyzzy_ptr","aw",%progbits
+ .dc.a xyzzy + .dc.a xyzzy
diff --git a/ld/testsuite/ld-x86-64/pr19827.rd b/ld/testsuite/ld-x86-64/pr19827.rd
new file mode 100644
index 0000000..67eaacc
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19827.rd
@@ -0,0 +1,5 @@
+#readelf: -r --wide
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset Info Type Symbol's Value Symbol's Name \+ Addend
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+
diff --git a/ld/testsuite/ld-x86-64/pr19827a.S b/ld/testsuite/ld-x86-64/pr19827a.S
new file mode 100644
index 0000000..cdf1d4b
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19827a.S
@@ -0,0 +1,8 @@
+ .text
+ .global _start
+_start:
+ .dc.a foo
+ .data
+ .globl foo
+foo:
+ .byte 0
diff --git a/ld/testsuite/ld-x86-64/pr19827b.S b/ld/testsuite/ld-x86-64/pr19827b.S
new file mode 100644
index 0000000..bb46e1d
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr19827b.S
@@ -0,0 +1,2 @@
+ .data
+ .dc.a foo
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 45b7f09..90f856c 100644 index 45b7f09..378c13f 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp --- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -353,6 +353,8 @@ run_dump_test "pr19013-x32" @@ -148,6 +148,14 @@ set x86_64tests {
"--64" {pr17709a.s} {} "libpr17709.so"}
{"PR ld/17709 (2)" "-melf_x86_64 tmpdir/libpr17709.so" ""
"--64" {pr17709b.s} {{readelf -rW pr17709.rd}} "pr17709"}
+ {"Build pr19827a.o" "" ""
+ "--64" { pr19827a.S }}
+ {"Build pr19827b.so" "-melf_x86_64 -shared" ""
+ "--64" { pr19827b.S } {} "pr19827b.so"}
+ {"Build pr19827" "-melf_x86_64 -pie tmpdir/pr19827a.o tmpdir/pr19827b.so" ""
+ "--64" { dummy.s } {{readelf {-rW} pr19827.rd}} "pr19827"}
+ {"Build pr19827.so" "-melf_x86_64 -shared -Bsymbolic" ""
+ "--64" { pr19827a.S } {{readelf {-rW} pr19827.rd}} "pr19827.so"}
}
# So as to avoid rewriting every last test case here in a nacl variant,
@@ -353,6 +361,8 @@ run_dump_test "pr19013-x32"
run_dump_test "pr19013-nacl" run_dump_test "pr19013-nacl"
run_dump_test "pr19162" run_dump_test "pr19162"
run_dump_test "pr19175" run_dump_test "pr19175"
@ -5935,7 +6100,7 @@ index 45b7f09..90f856c 100644
# Add $PLT_CFLAGS if PLT is expected. # Add $PLT_CFLAGS if PLT is expected.
global PLT_CFLAGS global PLT_CFLAGS
@@ -391,7 +393,7 @@ if { [isnative] && [which $CC] != 0 } { @@ -391,7 +401,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \ [list \
"Build libplt-main1.a" \ "Build libplt-main1.a" \
"" \ "" \
@ -5944,7 +6109,7 @@ index 45b7f09..90f856c 100644
{ plt-main1.c } \ { plt-main1.c } \
{{readelf {-Wr} plt-main1.rd}} \ {{readelf {-Wr} plt-main1.rd}} \
"libplt-main1.a" \ "libplt-main1.a" \
@@ -399,7 +401,7 @@ if { [isnative] && [which $CC] != 0 } { @@ -399,7 +409,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \ [list \
"Build libplt-main2.a" \ "Build libplt-main2.a" \
"" \ "" \
@ -5953,7 +6118,7 @@ index 45b7f09..90f856c 100644
{ plt-main2.c } \ { plt-main2.c } \
{{readelf {-Wr} plt-main2.rd}} \ {{readelf {-Wr} plt-main2.rd}} \
"libplt-main2.a" \ "libplt-main2.a" \
@@ -407,7 +409,7 @@ if { [isnative] && [which $CC] != 0 } { @@ -407,7 +417,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \ [list \
"Build libplt-main3.a" \ "Build libplt-main3.a" \
"" \ "" \
@ -5962,7 +6127,7 @@ index 45b7f09..90f856c 100644
{ plt-main3.c } \ { plt-main3.c } \
{{readelf {-Wr} plt-main3.rd}} \ {{readelf {-Wr} plt-main3.rd}} \
"libplt-main3.a" \ "libplt-main3.a" \
@@ -415,7 +417,7 @@ if { [isnative] && [which $CC] != 0 } { @@ -415,7 +425,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \ [list \
"Build libplt-main4.a" \ "Build libplt-main4.a" \
"" \ "" \
@ -5971,7 +6136,7 @@ index 45b7f09..90f856c 100644
{ plt-main4.c } \ { plt-main4.c } \
{{readelf {-Wr} plt-main4.rd}} \ {{readelf {-Wr} plt-main4.rd}} \
"libplt-main4.a" \ "libplt-main4.a" \
@@ -545,7 +547,7 @@ if { [isnative] && [which $CC] != 0 } { @@ -545,7 +555,7 @@ if { [isnative] && [which $CC] != 0 } {
[list \ [list \
"Build gotpcrel1" \ "Build gotpcrel1" \
"tmpdir/gotpcrel1d.so" \ "tmpdir/gotpcrel1d.so" \

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -1,8 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 17 12:51:55 UTC 2016 - rguenther@suse.com Fri Mar 18 07:57:51 UTC 2016 - rguenther@suse.com
- Update binutils-2.26-branch.diff, updates to branch head. - Update binutils-2.26-branch.diff, updates to branch head.
(bnc#970239) (swo#19807) (bnc#970239)
- Disable -mrelax-relocations by default on old products. - Disable -mrelax-relocations by default on old products.
------------------------------------------------------------------- -------------------------------------------------------------------