This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_28-branch] MIPS/LD/testsuite: Fix a `tls-multi-got-1-1.s' build failure
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 1 Feb 2017 22:25:34 -0000
- Subject: [binutils-gdb/binutils-2_28-branch] MIPS/LD/testsuite: Fix a `tls-multi-got-1-1.s' build failure
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04404fa75a041289750998b5118c91f886be1c34
commit 04404fa75a041289750998b5118c91f886be1c34
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Wed Feb 1 22:08:02 2017 +0000
MIPS/LD/testsuite: Fix a `tls-multi-got-1-1.s' build failure
Correct a commit ec9ab52c3217 ("gas: consistently emit diagnostics for
non-zero data emission to .bss/.struct"),
<https://sourceware.org/ml/binutils/2015-12/msg00073.html> regression:
.../ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s: Assembler messages:
.../ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s:39: Error: attempt to store non-zero value in section `.tbss'
ERROR: -EB -march=mips1 -32 -KPIC .../ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s: assembly failed
UNRESOLVED: Shared library with multiple GOTs and TLS
in MIPS target testing and move `tlsvar_ld' to `.tdata' section, in line
with the remaining local dynamic definitions introduced with the set of
tests added with commit f4e584bd00f1 ("TLS support for MIPS"),
<https://sourceware.org/ml/binutils/2005-02/msg00607.html>.
ld/
* testsuite/ld-mips-elf/tls-multi-got-1-1.s: Place `tlsvar_ld'
in `.tdata' section.
* testsuite/ld-mips-elf/tls-multi-got-1.got: Adjust accordingly.
* testsuite/ld-mips-elf/tls-multi-got-1.r: Likewise.
(cherry picked from commit 5139cfdb5515407900d0c3934c13712a5819456c)
Diff:
---
ld/ChangeLog | 7 ++++++
ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s | 3 +++
ld/testsuite/ld-mips-elf/tls-multi-got-1.got | 34 ++++++++++++++--------------
ld/testsuite/ld-mips-elf/tls-multi-got-1.r | 16 ++++++-------
4 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 39b8757..a38c567 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2017-02-01 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/ld-mips-elf/tls-multi-got-1-1.s: Place `tlsvar_ld'
+ in `.tdata' section.
+ * testsuite/ld-mips-elf/tls-multi-got-1.got: Adjust accordingly.
+ * testsuite/ld-mips-elf/tls-multi-got-1.r: Likewise.
+
2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
* emultempl/mipself.em (ignore_branch_isa): New variable.
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s b/ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s
index 60f6717..4faccde 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s
@@ -31,6 +31,9 @@ tlsvar_gd:
.size tlsvar_ie,4
tlsvar_ie:
.space 4
+
+ .section .tdata,"awT"
+ .align 2
.global tlsvar_ld
.hidden tlsvar_ld
.type tlsvar_ld,@object
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1.got b/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
index 9666ada..a7b8b1c 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.got
@@ -4,33 +4,33 @@
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
00000000 R_MIPS_NONE \*ABS\*
-0013f7f0 R_MIPS_TLS_DTPMOD32 \*ABS\*
-0014944c R_MIPS_TLS_DTPMOD32 \*ABS\*
-0013f7f8 R_MIPS_TLS_DTPMOD32 tlsvar_gd
-0013f7fc R_MIPS_TLS_DTPREL32 tlsvar_gd
-00149458 R_MIPS_TLS_DTPMOD32 tlsvar_gd
-0014945c R_MIPS_TLS_DTPREL32 tlsvar_gd
-0013f800 R_MIPS_TLS_TPREL32 tlsvar_ie
-00149454 R_MIPS_TLS_TPREL32 tlsvar_ie
-00143e78 R_MIPS_REL32 sym_1_9526
+0013f800 R_MIPS_TLS_DTPMOD32 \*ABS\*
+0014945c R_MIPS_TLS_DTPMOD32 \*ABS\*
+0013f808 R_MIPS_TLS_DTPMOD32 tlsvar_gd
+0013f80c R_MIPS_TLS_DTPREL32 tlsvar_gd
+00149468 R_MIPS_TLS_DTPMOD32 tlsvar_gd
+0014946c R_MIPS_TLS_DTPREL32 tlsvar_gd
+0013f810 R_MIPS_TLS_TPREL32 tlsvar_ie
+00149464 R_MIPS_TLS_TPREL32 tlsvar_ie
+00143e88 R_MIPS_REL32 sym_1_9526
#...
-00139a54 R_MIPS_REL32 sym_2_8654
+00139a64 R_MIPS_REL32 sym_2_8654
Contents of section .got:
- 122320 00000000 80000000 000d7f58 000d65b4 .*
- 122330 000d1f64 000d5fd0 000d5a08 000d1980 .*
+ 122330 00000000 80000000 000d7f58 000d65b4 .*
+ 122340 000d1f64 000d5fd0 000d5a08 000d1980 .*
#...
- 135ba0 000cf1c4 000e0e08 00000000 80000000 .*
- 135bb0 00000000 00000000 00000000 00000000 .*
+ 135bb0 000cf1c4 000e0e08 00000000 80000000 .*
+ 135bc0 00000000 00000000 00000000 00000000 .*
#...
- 13f7e0 00000000 00000000 00000000 00000000 .*
13f7f0 00000000 00000000 00000000 00000000 .*
- 13f800 00000000 00000000 80000000 00000000 .*
+ 13f800 00000000 00000000 00000000 00000000 .*
+ 13f810 00000000 00000000 80000000 00000000 .*
#...
- 149410 00000000 00000000 00000000 00000000 .*
149420 00000000 00000000 00000000 00000000 .*
149430 00000000 00000000 00000000 00000000 .*
149440 00000000 00000000 00000000 00000000 .*
149450 00000000 00000000 00000000 00000000 .*
+ 149460 00000000 00000000 00000000 00000000 .*
#pass
diff --git a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
index 45bd791..bb4f4ac 100644
--- a/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
+++ b/ld/testsuite/ld-mips-elf/tls-multi-got-1.r
@@ -6,7 +6,7 @@ Dynamic section at offset .* contains 18 entries:
0x00000006 \(SYMTAB\).*
0x0000000a \(STRSZ\) 220065 \(bytes\)
0x0000000b \(SYMENT\) 16 \(bytes\)
- 0x00000003 \(PLTGOT\) 0x122320
+ 0x00000003 \(PLTGOT\) 0x122330
0x00000011 \(REL\) 0xa7938
0x00000012 \(RELSZ\) 160072 \(bytes\)
0x00000013 \(RELENT\) 8 \(bytes\)
@@ -15,7 +15,7 @@ Dynamic section at offset .* contains 18 entries:
0x70000006 \(MIPS_BASE_ADDRESS\) 0x0
0x7000000a \(MIPS_LOCAL_GOTNO\) 2
0x70000011 \(MIPS_SYMTABNO\) 20011
- 0x70000012 \(MIPS_UNREFEXTNO\) 11
+ 0x70000012 \(MIPS_UNREFEXTNO\) 12
0x70000013 \(MIPS_GOTSYM\) 0xb
0x0000001e \(FLAGS\) STATIC_TLS
0x00000000 \(NULL\) 0x0
@@ -25,12 +25,12 @@ Relocation section '\.rel\.dyn' at offset 0x[0-9a-f]+ contains 20009 entries:
[0-9a-f ]+R_MIPS_NONE
[0-9a-f ]+R_MIPS_TLS_DTPMOD
[0-9a-f ]+R_MIPS_TLS_DTPMOD
-[0-9a-f ]+R_MIPS_TLS_DTPMOD 00000000 tlsvar_gd
-[0-9a-f ]+R_MIPS_TLS_DTPREL 00000000 tlsvar_gd
-[0-9a-f ]+R_MIPS_TLS_DTPMOD 00000000 tlsvar_gd
-[0-9a-f ]+R_MIPS_TLS_DTPREL 00000000 tlsvar_gd
-[0-9a-f ]+R_MIPS_TLS_TPREL3 00000004 tlsvar_ie
-[0-9a-f ]+R_MIPS_TLS_TPREL3 00000004 tlsvar_ie
+[0-9a-f ]+R_MIPS_TLS_DTPMOD 00000004 tlsvar_gd
+[0-9a-f ]+R_MIPS_TLS_DTPREL 00000004 tlsvar_gd
+[0-9a-f ]+R_MIPS_TLS_DTPMOD 00000004 tlsvar_gd
+[0-9a-f ]+R_MIPS_TLS_DTPREL 00000004 tlsvar_gd
+[0-9a-f ]+R_MIPS_TLS_TPREL3 00000008 tlsvar_ie
+[0-9a-f ]+R_MIPS_TLS_TPREL3 00000008 tlsvar_ie
[0-9a-f ]+R_MIPS_REL32 000d7f58 sym_1_9526
[0-9a-f ]+R_MIPS_REL32 000d65b4 sym_1_7885
#...