summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-11-18 08:58:29 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-11-18 12:42:48 -0800
commit650926534ed86e1ba55da3ddf691b0fc3f7875f3 (patch)
treed1a16ce0b99e2604451ad621767bc1bc0f8255fd
parentab7fede88eddf004994f8769e3c7ac145628f5b4 (diff)
downloadbinutils-gdb-users/hjl/plt.tar.gz
Add PLT_AFTER_TEXTusers/hjl/plt
-rw-r--r--ld/emulparams/elf_x86_64.sh6
-rw-r--r--ld/scripttempl/elf.sc8
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-1-local-x86.d2
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-1-x86.d2
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d4
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-2-x86-64.d4
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-3a-x86.d2
-rw-r--r--ld/testsuite/ld-ifunc/pr17154-x86-64.d64
-rw-r--r--ld/testsuite/ld-x86-64/bnd-branch-1.d12
-rw-r--r--ld/testsuite/ld-x86-64/bnd-ifunc-1.d2
-rw-r--r--ld/testsuite/ld-x86-64/bnd-ifunc-2.d64
-rw-r--r--ld/testsuite/ld-x86-64/bnd-plt-1.d68
-rw-r--r--ld/testsuite/ld-x86-64/mpx3.dd50
-rw-r--r--ld/testsuite/ld-x86-64/mpx4.dd29
-rw-r--r--ld/testsuite/ld-x86-64/plt.pd4
-rw-r--r--ld/testsuite/ld-x86-64/pr17618.s13
-rw-r--r--ld/testsuite/ld-x86-64/tlsbin.rd26
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc.pd12
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc.rd60
-rw-r--r--ld/testsuite/ld-x86-64/tlsgdesc.rd10
-rw-r--r--ld/testsuite/ld-x86-64/tlspic.rd26
21 files changed, 238 insertions, 230 deletions
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
index 1e83a74cbe4..0308cec0fef 100644
--- a/ld/emulparams/elf_x86_64.sh
+++ b/ld/emulparams/elf_x86_64.sh
@@ -15,9 +15,11 @@ NO_SMALL_DATA=yes
LARGE_SECTIONS=yes
LARGE_BSS_AFTER_BSS=
SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 24 ? 24 : 0"
+# Place .plt next to text sections so that .plt can refer .got.plt
+# with larger (> 2GB) text sections.
+PLT_AFTER_TEXT=
IREL_IN_PLT=
-# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
-TINY_READONLY_SECTION=".plt.bnd ${RELOCATING-0} : { *(.plt.bnd) }"
+EXTRA_PLT_SECTION=".plt.bnd ${RELOCATING-0} : { *(.plt.bnd) }"
if [ "x${host}" = "x${target}" ]; then
case " $EMULATION_LIBPATH " in
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 4368fd954e0..3f8b3cd4352 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -40,6 +40,8 @@
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
# PLT_NEXT_DATA - .plt next to data segment when .plt is in text segment.
+# PLT_AFTER_TEXT - .plt just after .text when .plt is in text segment.
+# DATA_PLT - .plt should be in data segment, not text segment.
# DATA_PLT - .plt should be in data segment, not text segment.
# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
# BSS_PLT - .plt should be in bss segment
@@ -137,7 +139,8 @@ fi
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
PLT=".plt ${RELOCATING-0} : { *(.plt)${IREL_IN_PLT+ *(.iplt)} }
- ${IREL_IN_PLT-$IPLT}"
+ ${IREL_IN_PLT-$IPLT}
+ ${EXTRA_PLT_SECTION}"
fi
test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=
if test -z "$GOT"; then
@@ -476,7 +479,7 @@ cat <<EOF
${RELOCATING+${INIT_END}}
} ${FILL}
- ${TEXT_PLT+${PLT_NEXT_DATA-${PLT}}}
+ ${TEXT_PLT+${PLT_NEXT_DATA-${PLT_AFTER_TEXT-${PLT}}}}
${TINY_READONLY_SECTION}
.text ${RELOCATING-0} :
{
@@ -499,6 +502,7 @@ cat <<EOF
${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
+ ${TEXT_PLT+${PLT_AFTER_TEXT+${PLT}}}
EOF
if test -n "${SEPARATE_CODE}"; then
diff --git a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
index 54086683acb..fa7adea2aeb 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
@@ -3,5 +3,5 @@
#target: x86_64-*-* i?86-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x170|\+0x200|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x170|\+0x1e0|)@plt>
#pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-1-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
index 8d223db8740..249790475ee 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
@@ -3,5 +3,5 @@
#target: x86_64-*-* i?86-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x190|\+0x220|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x190|\+0x200|)@plt>
#pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
index f72359d8dc8..b47bf447936 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
@@ -4,6 +4,6 @@
#target: x86_64-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x200@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x200@plt>
#pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
index f72359d8dc8..b47bf447936 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
@@ -4,6 +4,6 @@
#target: x86_64-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x200@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x200@plt>
#pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
index 3ff80241ded..e79451c98d4 100644
--- a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
@@ -4,5 +4,5 @@
#target: x86_64-*-* i?86-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x240|\+0x1a0|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x220|\+0x1a0|)@plt>
#pass
diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64.d b/ld/testsuite/ld-ifunc/pr17154-x86-64.d
index 0dbc547fd59..b8e02853e9c 100644
--- a/ld/testsuite/ld-ifunc/pr17154-x86-64.d
+++ b/ld/testsuite/ld-ifunc/pr17154-x86-64.d
@@ -4,43 +4,47 @@
#objdump: -dw
#target: x86_64-*-*
-#...
-0+2d0 <\*ABS\*\+0x32a@plt-0x10>:
-[ ]*[a-f0-9]+: ff 35 5a 01 20 00 pushq 0x20015a\(%rip\) # 200430 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: ff 25 5c 01 20 00 jmpq \*0x20015c\(%rip\) # 200438 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\)
+.*: +file format .*
-0+2e0 <\*ABS\*\+0x32a@plt>:
-[ ]*[a-f0-9]+: ff 25 5a 01 20 00 jmpq \*0x20015a\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
-[ ]*[a-f0-9]+: e9 e0 ff ff ff jmpq 2d0 <\*ABS\*\+0x32a@plt-0x10>
-0+2f0 <func1@plt>:
-[ ]*[a-f0-9]+: ff 25 52 01 20 00 jmpq \*0x200152\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x20>
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: e9 d0 ff ff ff jmpq 2d0 <\*ABS\*\+0x32a@plt-0x10>
+Disassembly of section .text:
-0+300 <func2@plt>:
-[ ]*[a-f0-9]+: ff 25 4a 01 20 00 jmpq \*0x20014a\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x28>
-[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
-[ ]*[a-f0-9]+: e9 c0 ff ff ff jmpq 2d0 <\*ABS\*\+0x32a@plt-0x10>
+0+2c8 <resolve1>:
+[ ]*[a-f0-9]+: e8 33 00 00 00 callq 300 <func1@plt>
-0+310 <\*ABS\*\+0x320@plt>:
-[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200458 <_GLOBAL_OFFSET_TABLE_\+0x30>
-[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
-[ ]*[a-f0-9]+: e9 b0 ff ff ff jmpq 2d0 <\*ABS\*\+0x32a@plt-0x10>
+0+2cd <g1>:
+[ ]*[a-f0-9]+: e9 4e 00 00 00 jmpq 320 <\*ABS\*\+0x2c8@plt>
-Disassembly of section .text:
+0+2d2 <resolve2>:
+[ ]*[a-f0-9]+: e8 39 00 00 00 callq 310 <func2@plt>
-0+320 <resolve1>:
-[ ]*[a-f0-9]+: e8 cb ff ff ff callq 2f0 <func1@plt>
+0+2d7 <g2>:
+[ ]*[a-f0-9]+: e9 14 00 00 00 jmpq 2f0 <\*ABS\*\+0x2d2@plt>
-0+325 <g1>:
-[ ]*[a-f0-9]+: e9 e6 ff ff ff jmpq 310 <\*ABS\*\+0x320@plt>
+Disassembly of section .plt:
-0+32a <resolve2>:
-[ ]*[a-f0-9]+: e8 d1 ff ff ff callq 300 <func2@plt>
+0+2e0 <\*ABS\*\+0x2d2@plt-0x10>:
+[ ]*[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 200428 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: ff 25 44 01 20 00 jmpq \*0x200144\(%rip\) # 200430 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\)
-0+32f <g2>:
-[ ]*[a-f0-9]+: e9 ac ff ff ff jmpq 2e0 <\*ABS\*\+0x32a@plt>
+0+2f0 <\*ABS\*\+0x2d2@plt>:
+[ ]*[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 200438 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
+[ ]*[a-f0-9]+: e9 e0 ff ff ff jmpq 2e0 <g2\+0x9>
+
+0+300 <func1@plt>:
+[ ]*[a-f0-9]+: ff 25 3a 01 20 00 jmpq \*0x20013a\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
+[ ]*[a-f0-9]+: e9 d0 ff ff ff jmpq 2e0 <g2\+0x9>
+
+0+310 <func2@plt>:
+[ ]*[a-f0-9]+: ff 25 32 01 20 00 jmpq \*0x200132\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x28>
+[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
+[ ]*[a-f0-9]+: e9 c0 ff ff ff jmpq 2e0 <g2\+0x9>
+
+0+320 <\*ABS\*\+0x2c8@plt>:
+[ ]*[a-f0-9]+: ff 25 2a 01 20 00 jmpq \*0x20012a\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x30>
+[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
+[ ]*[a-f0-9]+: e9 b0 ff ff ff jmpq 2e0 <g2\+0x9>
#pass
diff --git a/ld/testsuite/ld-x86-64/bnd-branch-1.d b/ld/testsuite/ld-x86-64/bnd-branch-1.d
index 8368f37bd08..f2eae8cdc5b 100644
--- a/ld/testsuite/ld-x86-64/bnd-branch-1.d
+++ b/ld/testsuite/ld-x86-64/bnd-branch-1.d
@@ -10,10 +10,10 @@ Disassembly of section .text:
#...
[a-f0-9]+ <_start>:
-[ ]*[a-f0-9]+: f2 e9 [a-f0-9]+ ff ff ff bnd jmpq [a-f0-9]+ <foo1@plt>
-[ ]*[a-f0-9]+: e8 [a-f0-9]+ ff ff ff callq [a-f0-9]+ <foo2@plt>
-[ ]*[a-f0-9]+: e9 [a-f0-9]+ ff ff ff jmpq [a-f0-9]+ <foo3@plt>
-[ ]*[a-f0-9]+: e8 [a-f0-9]+ ff ff ff callq [a-f0-9]+ <foo4@plt>
-[ ]*[a-f0-9]+: f2 e8 [a-f0-9]+ ff ff ff bnd callq [a-f0-9]+ <foo3@plt>
-[ ]*[a-f0-9]+: e9 [a-f0-9]+ ff ff ff jmpq [a-f0-9]+ <foo4@plt>
+[ ]*[a-f0-9]+: f2 e9 [a-f0-9]+ 00 00 00 bnd jmpq [a-f0-9]+ <foo1@plt>
+[ ]*[a-f0-9]+: e8 [a-f0-9]+ 00 00 00 callq [a-f0-9]+ <foo2@plt>
+[ ]*[a-f0-9]+: e9 [a-f0-9]+ 00 00 00 jmpq [a-f0-9]+ <foo3@plt>
+[ ]*[a-f0-9]+: e8 [a-f0-9]+ 00 00 00 callq [a-f0-9]+ <foo4@plt>
+[ ]*[a-f0-9]+: f2 e8 [a-f0-9]+ 00 00 00 bnd callq [a-f0-9]+ <foo3@plt>
+[ ]*[a-f0-9]+: e9 [a-f0-9]+ 00 00 00 jmpq [a-f0-9]+ <foo4@plt>
#pass
diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1.d b/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
index 11313ab1c11..bcffe471f09 100644
--- a/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
+++ b/ld/testsuite/ld-x86-64/bnd-ifunc-1.d
@@ -3,5 +3,5 @@
#objdump: -dw
#...
-[ ]*[a-f0-9]+: f2 e8 f0 ff ff ff bnd callq 220 <\*ABS\*\+0x228@plt>
+[ ]*[a-f0-9]+: f2 e8 28 00 00 00 bnd callq 230 <\*ABS\*\+0x200@plt>
#pass
diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d b/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
index 6be829023e0..37a756118dc 100644
--- a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
+++ b/ld/testsuite/ld-x86-64/bnd-ifunc-2.d
@@ -2,53 +2,57 @@
#ld: -shared -melf_x86_64 -z bndplt
#objdump: -dw
-#...
-0+2d0 <.plt>:
-[ ]*[a-f0-9]+: ff 35 7a 01 20 00 pushq 0x20017a\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 7b 01 20 00 bnd jmpq \*0x20017b\(%rip\) # 200458 <_GLOBAL_OFFSET_TABLE_\+0x10>
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+2c8 <resolve1>:
+[ ]*[a-f0-9]+: f2 e8 6a 00 00 00 bnd callq 338 <func1@plt>
+
+0+2ce <g1>:
+[ ]*[a-f0-9]+: f2 e9 74 00 00 00 bnd jmpq 348 <\*ABS\*\+0x2c8@plt>
+
+0+2d4 <resolve2>:
+[ ]*[a-f0-9]+: f2 e8 66 00 00 00 bnd callq 340 <func2@plt>
+
+0+2da <g2>:
+[ ]*[a-f0-9]+: f2 e9 50 00 00 00 bnd jmpq 330 <\*ABS\*\+0x2d4@plt>
+
+Disassembly of section .plt:
+
+0+2e0 <.plt>:
+[ ]*[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: f2 ff 25 63 01 20 00 bnd jmpq \*0x200163\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x10>
[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2d0 <\*ABS\*\+0x34c@plt-0x50>
+[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2e0 <g2\+0x6>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2d0 <\*ABS\*\+0x34c@plt-0x50>
+[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2e0 <g2\+0x6>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
-[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2d0 <\*ABS\*\+0x34c@plt-0x50>
+[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2e0 <g2\+0x6>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
-[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2d0 <\*ABS\*\+0x34c@plt-0x50>
+[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2e0 <g2\+0x6>
[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
Disassembly of section .plt.bnd:
-0+320 <\*ABS\*\+0x34c@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmpq \*0x200139\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x18>
+0+330 <\*ABS\*\+0x2d4@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200458 <_GLOBAL_OFFSET_TABLE_\+0x18>
[ ]*[a-f0-9]+: 90 nop
-0+328 <func1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmpq \*0x200139\(%rip\) # 200468 <_GLOBAL_OFFSET_TABLE_\+0x20>
+0+338 <func1@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x20>
[ ]*[a-f0-9]+: 90 nop
-0+330 <func2@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmpq \*0x200139\(%rip\) # 200470 <_GLOBAL_OFFSET_TABLE_\+0x28>
+0+340 <func2@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200468 <_GLOBAL_OFFSET_TABLE_\+0x28>
[ ]*[a-f0-9]+: 90 nop
-0+338 <\*ABS\*\+0x340@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 39 01 20 00 bnd jmpq \*0x200139\(%rip\) # 200478 <_GLOBAL_OFFSET_TABLE_\+0x30>
+0+348 <\*ABS\*\+0x2c8@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200470 <_GLOBAL_OFFSET_TABLE_\+0x30>
[ ]*[a-f0-9]+: 90 nop
-
-Disassembly of section .text:
-
-0+340 <resolve1>:
-[ ]*[a-f0-9]+: f2 e8 e2 ff ff ff bnd callq 328 <func1@plt>
-
-0+346 <g1>:
-[ ]*[a-f0-9]+: f2 e9 ec ff ff ff bnd jmpq 338 <\*ABS\*\+0x340@plt>
-
-0+34c <resolve2>:
-[ ]*[a-f0-9]+: f2 e8 de ff ff ff bnd callq 330 <func2@plt>
-
-0+352 <g2>:
-[ ]*[a-f0-9]+: f2 e9 c8 ff ff ff bnd jmpq 320 <\*ABS\*\+0x34c@plt>
#pass
diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1.d b/ld/testsuite/ld-x86-64/bnd-plt-1.d
index d76a7a7de02..23b0de82d6e 100644
--- a/ld/testsuite/ld-x86-64/bnd-plt-1.d
+++ b/ld/testsuite/ld-x86-64/bnd-plt-1.d
@@ -6,50 +6,50 @@
.*: +file format .*
+Disassembly of section .text:
+
+0+2a8 <_start>:
+[ ]*[a-f0-9]+: f2 e9 82 00 00 00 bnd jmpq 330 <foo1@plt>
+[ ]*[a-f0-9]+: e8 6d 00 00 00 callq 320 <foo2@plt>
+[ ]*[a-f0-9]+: e9 70 00 00 00 jmpq 328 <foo3@plt>
+[ ]*[a-f0-9]+: e8 7b 00 00 00 callq 338 <foo4@plt>
+[ ]*[a-f0-9]+: f2 e8 65 00 00 00 bnd callq 328 <foo3@plt>
+[ ]*[a-f0-9]+: e9 70 00 00 00 jmpq 338 <foo4@plt>
+
Disassembly of section .plt:
-0+2b0 <.plt>:
-[ ]*[a-f0-9]+: ff 35 82 01 20 00 pushq 0x200182\(%rip\) # 200438 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 83 01 20 00 bnd jmpq \*0x200183\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
-[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
-[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
-[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2b0 <foo2@plt-0x50>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+0+2d0 <.plt>:
+[ ]*[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200438 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: f2 ff 25 63 01 20 00 bnd jmpq \*0x200163\(%rip\) # 200440 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
+[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 2d0 <_start\+0x28>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
+[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 2d0 <_start\+0x28>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: 68 02 00 00 00 pushq \$0x2
+[ ]*[a-f0-9]+: f2 e9 c5 ff ff ff bnd jmpq 2d0 <_start\+0x28>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: 68 03 00 00 00 pushq \$0x3
+[ ]*[a-f0-9]+: f2 e9 b5 ff ff ff bnd jmpq 2d0 <_start\+0x28>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
Disassembly of section .plt.bnd:
-0+300 <foo2@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18>
+0+320 <foo2@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200448 <_GLOBAL_OFFSET_TABLE_\+0x18>
[ ]*[a-f0-9]+: 90 nop
-0+308 <foo3@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x20>
+0+328 <foo3@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200450 <_GLOBAL_OFFSET_TABLE_\+0x20>
[ ]*[a-f0-9]+: 90 nop
-0+310 <foo1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200458 <_GLOBAL_OFFSET_TABLE_\+0x28>
+0+330 <foo1@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200458 <_GLOBAL_OFFSET_TABLE_\+0x28>
[ ]*[a-f0-9]+: 90 nop
-0+318 <foo4@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 41 01 20 00 bnd jmpq \*0x200141\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30>
+0+338 <foo4@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 21 01 20 00 bnd jmpq \*0x200121\(%rip\) # 200460 <_GLOBAL_OFFSET_TABLE_\+0x30>
[ ]*[a-f0-9]+: 90 nop
-
-Disassembly of section .text:
-
-0+320 <_start>:
-[ ]*[a-f0-9]+: f2 e9 ea ff ff ff bnd jmpq 310 <foo1@plt>
-[ ]*[a-f0-9]+: e8 d5 ff ff ff callq 300 <foo2@plt>
-[ ]*[a-f0-9]+: e9 d8 ff ff ff jmpq 308 <foo3@plt>
-[ ]*[a-f0-9]+: e8 e3 ff ff ff callq 318 <foo4@plt>
-[ ]*[a-f0-9]+: f2 e8 cd ff ff ff bnd callq 308 <foo3@plt>
-[ ]*[a-f0-9]+: e9 d8 ff ff ff jmpq 318 <foo4@plt>
#pass
diff --git a/ld/testsuite/ld-x86-64/mpx3.dd b/ld/testsuite/ld-x86-64/mpx3.dd
index 2a8356d9e2e..4b1b606d280 100644
--- a/ld/testsuite/ld-x86-64/mpx3.dd
+++ b/ld/testsuite/ld-x86-64/mpx3.dd
@@ -1,35 +1,35 @@
.*: +file format .*
-Disassembly of section .plt:
+Disassembly of section .text:
-0+400290 <.plt>:
-[ ]*[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 600400 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 6b 01 20 00 bnd jmpq \*0x20016b\(%rip\) # 600408 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400290 <call1@plt-0x30>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
-[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 400290 <call1@plt-0x30>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+0+400290 <_start>:
+[ ]*[a-f0-9]+: bf e0 02 40 00 mov \$0x4002e0,%edi
+[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+[ ]*[a-f0-9]+: 48 8b 3d 89 01 20 00 mov 0x200189\(%rip\),%rdi # 600428 <func>
+[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+[ ]*[a-f0-9]+: c3 retq
-Disassembly of section .plt.bnd:
+Disassembly of section .plt:
-0+4002c0 <call1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600410 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 90 nop
+0+4002b0 <.plt>:
+[ ]*[a-f0-9]+: ff 35 52 01 20 00 pushq 0x200152\(%rip\) # 600408 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: f2 ff 25 53 01 20 00 bnd jmpq \*0x200153\(%rip\) # 600410 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
+[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 4002b0 <_start\+0x20>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: 68 01 00 00 00 pushq \$0x1
+[ ]*[a-f0-9]+: f2 e9 d5 ff ff ff bnd jmpq 4002b0 <_start\+0x20>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
-0+4002c8 <call2@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 49 01 20 00 bnd jmpq \*0x200149\(%rip\) # 600418 <_GLOBAL_OFFSET_TABLE_\+0x20>
-[ ]*[a-f0-9]+: 90 nop
+Disassembly of section .plt.bnd:
-Disassembly of section .text:
+0+4002e0 <call1@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmpq \*0x200131\(%rip\) # 600418 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*[a-f0-9]+: 90 nop
-0+4002d0 <_start>:
-[ ]*[a-f0-9]+: bf c0 02 40 00 mov \$0x4002c0,%edi
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
-[ ]*[a-f0-9]+: 48 8b 3d 41 01 20 00 mov 0x200141\(%rip\),%rdi # 600420 <func>
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
-[ ]*[a-f0-9]+: c3 retq
+0+4002e8 <call2@plt>:
+[ ]*[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmpq \*0x200131\(%rip\) # 600420 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*[a-f0-9]+: 90 nop
#pass
diff --git a/ld/testsuite/ld-x86-64/mpx4.dd b/ld/testsuite/ld-x86-64/mpx4.dd
index 0cf0f75898b..7ea6a228258 100644
--- a/ld/testsuite/ld-x86-64/mpx4.dd
+++ b/ld/testsuite/ld-x86-64/mpx4.dd
@@ -1,24 +1,25 @@
.*: +file format .*
+Disassembly of section .text:
+
+0+400258 <_start>:
+[ ]*[a-f0-9]+: bf 80 02 40 00 mov \$0x400280,%edi
+[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+
Disassembly of section .plt:
0+400260 <.plt>:
-[ ]*[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 6003a8 <_GLOBAL_OFFSET_TABLE_\+0x8>
-[ ]*[a-f0-9]+: f2 ff 25 43 01 20 00 bnd jmpq \*0x200143\(%rip\) # 6003b0 <_GLOBAL_OFFSET_TABLE_\+0x10>
-[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
-[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
-[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400260 <call1@plt-0x20>
-[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
+[ ]*[a-f0-9]+: ff 35 3a 01 20 00 pushq 0x20013a\(%rip\) # 6003a0 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[a-f0-9]+: f2 ff 25 3b 01 20 00 bnd jmpq \*0x20013b\(%rip\) # 6003a8 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+[ ]*[a-f0-9]+: 68 00 00 00 00 pushq \$0x0
+[ ]*[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 400260 <_start\+0x8>
+[ ]*[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
Disassembly of section .plt.bnd:
0+400280 <call1@plt>:
-[ ]*[a-f0-9]+: f2 ff 25 31 01 20 00 bnd jmpq \*0x200131\(%rip\) # 6003b8 <_GLOBAL_OFFSET_TABLE_\+0x18>
-[ ]*[a-f0-9]+: 90 nop
-
-Disassembly of section .text:
-
-0+400288 <_start>:
-[ ]*[a-f0-9]+: bf 80 02 40 00 mov \$0x400280,%edi
-[ ]*[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+[ ]*[a-f0-9]+: f2 ff 25 29 01 20 00 bnd jmpq \*0x200129\(%rip\) # 6003b0 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*[a-f0-9]+: 90 nop
+#pass
diff --git a/ld/testsuite/ld-x86-64/plt.pd b/ld/testsuite/ld-x86-64/plt.pd
index b11cc22aab8..155a447dac0 100644
--- a/ld/testsuite/ld-x86-64/plt.pd
+++ b/ld/testsuite/ld-x86-64/plt.pd
@@ -16,9 +16,9 @@ Disassembly of section .plt:
[0-9a-f]+ <fn1@plt>:
+[0-9a-f]+: ff 25 ([0-9a-f]{2} ){4} * jmpq \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x18>
+[0-9a-f]+: 68 00 00 00 00 pushq \$0x0
- +[0-9a-f]+: e9 ([0-9a-f]{2} ){4} * jmpq [0-9a-f]+ <fn1@plt-0x10>
+ +[0-9a-f]+: e9 ([0-9a-f]{2} ){4} * jmpq [0-9a-f]+ <_start\+0x10>
[0-9a-f]+ <fn2@plt>:
+[0-9a-f]+: ff 25 ([0-9a-f]{2} ){4} * jmpq \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x20>
+[0-9a-f]+: 68 01 00 00 00 pushq \$0x1
- +[0-9a-f]+: e9 ([0-9a-f]{2} ){4} * jmpq [0-9a-f]+ <fn1@plt-0x10>
+ +[0-9a-f]+: e9 ([0-9a-f]{2} ){4} * jmpq [0-9a-f]+ <_start\+0x10>
diff --git a/ld/testsuite/ld-x86-64/pr17618.s b/ld/testsuite/ld-x86-64/pr17618.s
index 39102e07978..f6c29427997 100644
--- a/ld/testsuite/ld-x86-64/pr17618.s
+++ b/ld/testsuite/ld-x86-64/pr17618.s
@@ -5,14 +5,7 @@ foo:
call bar@PLT
.size foo, .-foo
- .globl gap
- .type gap, @function
-gap:
- jmp .L0
- .space 0x40000000, 0x90
-.L0:
- jmp .L2
- .space 0x3fdfff14, 0x90
-.L2:
- .size gap, .-gap
+ .section .rodata,"a",@progbits
+ .space 0x40000000
+ .space 0x3fdfff14
.section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/tlsbin.rd b/ld/testsuite/ld-x86-64/tlsbin.rd
index df5e8555eb9..292d0f571ab 100644
--- a/ld/testsuite/ld-x86-64/tlsbin.rd
+++ b/ld/testsuite/ld-x86-64/tlsbin.rd
@@ -16,13 +16,13 @@ Section Headers:
+\[[ 0-9]+\] .dynstr +.*
+\[[ 0-9]+\] .rela.dyn +.*
+\[[ 0-9]+\] .rela.plt +.*
- +\[[ 0-9]+\] .plt +.*
+\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+231 00 +AX +0 +0 +4096
- +\[[ 0-9]+\] .tdata +PROGBITS +0+601231 0+1231 0+60 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .tbss +NOBITS +0+601291 0+1291 0+40 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .dynamic +DYNAMIC +0+601298 0+1298 0+140 10 +WA +4 +0 +8
- +\[[ 0-9]+\] .got +PROGBITS +0+6013d8 0+13d8 0+20 08 +WA +0 +0 +8
- +\[[ 0-9]+\] .got.plt +PROGBITS +0+6013f8 0+13f8 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .plt +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+601260 0+1260 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+6012c0 0+12c0 0+40 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+6012c0 0+12c0 0+140 10 +WA +4 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+601400 0+1400 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+601420 0+1420 0+20 08 +WA +0 +0 +8
+\[[ 0-9]+\] .shstrtab +.*
+\[[ 0-9]+\] .symtab +.*
+\[[ 0-9]+\] .strtab +.*
@@ -40,16 +40,16 @@ Program Headers:
+PHDR.*
+INTERP.*
.*Requesting program interpreter.*
- +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+1231 0x0+1231 R E 0x200000
- +LOAD +0x0+1231 0x0+601231 0x0+601231 0x0+1e7 0x0+1e7 RW +0x200000
- +DYNAMIC +0x0+1298 0x0+601298 0x0+601298 0x0+140 0x0+140 RW +0x8
- +TLS +0x0+1231 0x0+601231 0x0+601231 0x0+60 0x0+a0 R +0x1
+ +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+1260 0x0+1260 R E 0x200000
+ +LOAD +0x0+1260 0x0+601260 0x0+601260 0x0+1e0 0x0+1e0 RW +0x200000
+ +DYNAMIC +0x0+12c0 0x0+6012c0 0x0+6012c0 0x0+140 0x0+140 RW +0x8
+ +TLS +0x0+1260 0x0+601260 0x0+601260 0x0+60 0x0+a0 R +0x1
Section to Segment mapping:
+Segment Sections...
+00 *
+01 +.interp *
- +02 +.interp .hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+ +02 +.interp .hash .dynsym .dynstr .rela.dyn .rela.plt .text .plt *
+03 +.tdata .dynamic .got .got.plt *
+04 +.dynamic *
+05 +.tdata .tbss *
@@ -129,13 +129,13 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +HIDDEN +9 sh7
.* TLS +GLOBAL +HIDDEN +9 sh8
.* TLS +GLOBAL +DEFAULT +9 sg1
-.* FUNC +GLOBAL +DEFAULT +8 _start
+.* FUNC +GLOBAL +DEFAULT +7 _start
.* TLS +GLOBAL +HIDDEN +9 sh4
.* TLS +GLOBAL +DEFAULT +10 bg7
.* TLS +GLOBAL +HIDDEN +9 sh5
.* NOTYPE +GLOBAL +DEFAULT +13 __bss_start
.* TLS +GLOBAL +DEFAULT +UND sG6
-.* FUNC +GLOBAL +DEFAULT +8 fn2
+.* FUNC +GLOBAL +DEFAULT +7 fn2
.* TLS +GLOBAL +DEFAULT +9 sg2
.* TLS +GLOBAL +DEFAULT +UND sG1
.* TLS +GLOBAL +HIDDEN +9 sh1
diff --git a/ld/testsuite/ld-x86-64/tlsdesc.pd b/ld/testsuite/ld-x86-64/tlsdesc.pd
index c24403c15cc..582c9402d72 100644
--- a/ld/testsuite/ld-x86-64/tlsdesc.pd
+++ b/ld/testsuite/ld-x86-64/tlsdesc.pd
@@ -10,10 +10,10 @@
Disassembly of section .plt:
[0-9a-f]+ <.plt>:
- [0-9a-f]+: ff 35 .. .. 20 00 pushq .*\(%rip\) # 201358 <_GLOBAL_OFFSET_TABLE_\+0x8>
- [0-9a-f]+: ff 25 .. .. 20 00 jmpq \*.*\(%rip\) # 201360 <_GLOBAL_OFFSET_TABLE_\+0x10>
- [0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\)
- [0-9a-f]+: ff 35 .. .. 20 00 pushq .*\(%rip\) # 201358 <_GLOBAL_OFFSET_TABLE_\+0x8>
- [0-9a-f]+: ff 25 .. .. 20 00 jmpq \*.*\(%rip\) # 201348 <_DYNAMIC\+0x190>
- [0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\)
+[ ]*[0-9a-f]+: ff 35 .. .. 20 00 pushq .*\(%rip\) # 201380 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[0-9a-f]+: ff 25 .. .. 20 00 jmpq \*.*\(%rip\) # 201388 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*[0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\)
+[ ]*[0-9a-f]+: ff 35 .. .. 20 00 pushq .*\(%rip\) # 201380 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[ ]*[0-9a-f]+: ff 25 .. .. 20 00 jmpq \*.*\(%rip\) # 201370 <_DYNAMIC\+0x190>
+[ ]*[0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\)
diff --git a/ld/testsuite/ld-x86-64/tlsdesc.rd b/ld/testsuite/ld-x86-64/tlsdesc.rd
index ee43ee2a588..2a5b1c04819 100644
--- a/ld/testsuite/ld-x86-64/tlsdesc.rd
+++ b/ld/testsuite/ld-x86-64/tlsdesc.rd
@@ -15,13 +15,13 @@ Section Headers:
+\[[ 0-9]+\] .dynstr +.*
+\[[ 0-9]+\] .rela.dyn +.*
+\[[ 0-9]+\] .rela.plt +.*
- +\[[ 0-9]+\] .plt +PROGBITS +0+450 0+450 0+20 10 +AX +0 +0 +(4|16)
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+153 00 +AX +0 +0 4096
- +\[[ 0-9]+\] .tdata +PROGBITS +0+201153 0+1153 0+60 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .tbss +NOBITS +0+2011b3 0+11b3 0+20 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .dynamic +DYNAMIC +0+2011b8 0+11b8 0+150 10 +WA +3 +0 +8
- +\[[ 0-9]+\] .got +PROGBITS +0+201308 0+1308 0+48 08 +WA +0 +0 +8
- +\[[ 0-9]+\] .got.plt +PROGBITS +0+201350 0+1350 0+68 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .plt +PROGBITS +0+1160 0+1160 0+20 10 +AX +0 +0 +(4|16)
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+201180 0+1180 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+2011e0 0+11e0 0+20 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+2011e0 0+11e0 0+150 10 +WA +3 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+201330 0+1330 0+48 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+201378 0+1378 0+68 08 +WA +0 +0 +8
+\[[ 0-9]+\] .shstrtab +.*
+\[[ 0-9]+\] .symtab +.*
+\[[ 0-9]+\] .strtab +.*
@@ -37,13 +37,13 @@ There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+LOAD +0x0+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x200000
- +LOAD +0x0+1153 0x0+201153 0x0+201153 0x0+265 0x0+265 RW +0x200000
- +DYNAMIC +0x0+11b8 0x0+2011b8 0x0+2011b8 0x0+150 0x0+150 RW +0x8
- +TLS +0x0+1153 0x0+201153 0x0+201153 0x0+60 0x0+80 R +0x1
+ +LOAD +0x0+1180 0x0+201180 0x0+201180 0x0+260 0x0+260 RW +0x200000
+ +DYNAMIC +0x0+11e0 0x0+2011e0 0x0+2011e0 0x0+150 0x0+150 RW +0x8
+ +TLS +0x0+1180 0x0+201180 0x0+201180 0x0+60 0x0+80 R +0x1
Section to Segment mapping:
+Segment Sections...
- +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+ +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .text .plt *
+01 +.tdata .dynamic .got .got.plt *
+02 +.dynamic *
+03 +.tdata .tbss *
@@ -59,8 +59,8 @@ Dynamic section at offset 0x[0-9a-f]+ contains 16 entries:
0x[0-9a-f]+ +\(PLTRELSZ\).*
0x[0-9a-f]+ +\(PLTREL\).*
0x[0-9a-f]+ +\(JMPREL\).*
- 0x[0-9a-f]+ +\(TLSDESC_PLT\) +0x460
- 0x[0-9a-f]+ +\(TLSDESC_GOT\) +0x201348
+ 0x[0-9a-f]+ +\(TLSDESC_PLT\) +0x1170
+ 0x[0-9a-f]+ +\(TLSDESC_GOT\) +0x201370
0x[0-9a-f]+ +\(RELA\).*
0x[0-9a-f]+ +\(RELASZ\).*
0x[0-9a-f]+ +\(RELAENT\).*
@@ -69,34 +69,34 @@ Dynamic section at offset 0x[0-9a-f]+ contains 16 entries:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+201308 +[0-9a-f]+ R_X86_64_TPOFF64 +24
-0+201310 +[0-9a-f]+ R_X86_64_TPOFF64 +30
-0+201318 +[0-9a-f]+ R_X86_64_TPOFF64 +64
-0+201328 +[0-9a-f]+ R_X86_64_TPOFF64 +50
-0+201330 +[0-9a-f]+ R_X86_64_TPOFF64 +70
-0+201340 +[0-9a-f]+ R_X86_64_TPOFF64 +44
-0+201320 +[0-9a-f]+ R_X86_64_TPOFF64 +0+10 sg5 \+ 0
-0+201338 +[0-9a-f]+ R_X86_64_TPOFF64 +0+4 sg2 \+ 0
+0+201330 +[0-9a-f]+ R_X86_64_TPOFF64 +24
+0+201338 +[0-9a-f]+ R_X86_64_TPOFF64 +30
+0+201340 +[0-9a-f]+ R_X86_64_TPOFF64 +64
+0+201350 +[0-9a-f]+ R_X86_64_TPOFF64 +50
+0+201358 +[0-9a-f]+ R_X86_64_TPOFF64 +70
+0+201368 +[0-9a-f]+ R_X86_64_TPOFF64 +44
+0+201348 +[0-9a-f]+ R_X86_64_TPOFF64 +0+10 sg5 \+ 0
+0+201360 +[0-9a-f]+ R_X86_64_TPOFF64 +0+4 sg2 \+ 0
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 5 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+201398 +[0-9a-f]+ R_X86_64_TLSDESC +0+ sg1 \+ 0
-0+201368 +[0-9a-f]+ R_X86_64_TLSDESC +20
-0+2013a8 +[0-9a-f]+ R_X86_64_TLSDESC +40
-0+201378 +[0-9a-f]+ R_X86_64_TLSDESC +60
-0+201388 +[0-9a-f]+ R_X86_64_TLSDESC +0
+0+2013c0 +[0-9a-f]+ R_X86_64_TLSDESC +0+ sg1 \+ 0
+0+201390 +[0-9a-f]+ R_X86_64_TLSDESC +20
+0+2013d0 +[0-9a-f]+ R_X86_64_TLSDESC +40
+0+2013a0 +[0-9a-f]+ R_X86_64_TLSDESC +60
+0+2013b0 +[0-9a-f]+ R_X86_64_TLSDESC +0
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
- +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
- +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +7 fn1
+ +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +6 fn1
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start
+[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
@@ -146,14 +146,14 @@ Symbol table '\.symtab' contains [0-9]+ entries:
+[0-9]+: 0+54 +0 +TLS +LOCAL +DEFAULT +8 sh6
.* FILE +LOCAL +DEFAULT +ABS .*
+[0-9]+: 0+ +0 +TLS +LOCAL +DEFAULT +8 _TLS_MODULE_BASE_
- +[0-9]+: 0+2011b8 +0 +OBJECT +LOCAL +DEFAULT +10 _DYNAMIC
- +[0-9]+: 0+201350 +0 +OBJECT +LOCAL +DEFAULT +12 _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+2011e0 +0 +OBJECT +LOCAL +DEFAULT +10 _DYNAMIC
+ +[0-9]+: 0+201378 +0 +OBJECT +LOCAL +DEFAULT +12 _GLOBAL_OFFSET_TABLE_
+[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
- +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +7 fn1
+ +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +6 fn1
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start
+[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
diff --git a/ld/testsuite/ld-x86-64/tlsgdesc.rd b/ld/testsuite/ld-x86-64/tlsgdesc.rd
index 2eb2ec0f6ba..f8cfd6a51ea 100644
--- a/ld/testsuite/ld-x86-64/tlsgdesc.rd
+++ b/ld/testsuite/ld-x86-64/tlsgdesc.rd
@@ -14,8 +14,8 @@ Section Headers:
+\[[ 0-9]+\] \.dynstr +.*
+\[[ 0-9]+\] \.rela.dyn +.*
+\[[ 0-9]+\] \.rela.plt +.*
- +\[[ 0-9]+\] \.plt +.*
+\[[ 0-9]+\] \.text +.*
+ +\[[ 0-9]+\] \.plt +.*
+\[[ 0-9]+\] \.dynamic +.*
+\[[ 0-9]+\] \.got +.*
+\[[ 0-9]+\] \.got.plt +.*
@@ -39,7 +39,7 @@ Program Headers:
Section to Segment mapping:
+Segment Sections...
- +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+ +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .text .plt *
+01 +.dynamic .got .got.plt *
+02 +.dynamic *
@@ -63,7 +63,7 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 3 entries:
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
- +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
@@ -71,7 +71,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
+[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
- +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +7 fc1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +6 fc1
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 _edata
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 _end
@@ -98,7 +98,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
+[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
- +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +7 fc1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +6 fc1
+[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 _edata
+[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +10 _end
diff --git a/ld/testsuite/ld-x86-64/tlspic.rd b/ld/testsuite/ld-x86-64/tlspic.rd
index 3caed27ce73..01a2e9e483f 100644
--- a/ld/testsuite/ld-x86-64/tlspic.rd
+++ b/ld/testsuite/ld-x86-64/tlspic.rd
@@ -15,13 +15,13 @@ Section Headers:
+\[[ 0-9]+\] .dynstr +.*
+\[[ 0-9]+\] .rela.dyn +.*
+\[[ 0-9]+\] .rela.plt +.*
- +\[[ 0-9]+\] .plt +.*
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096
- +\[[ 0-9]+\] .tdata +PROGBITS +0+20131a 0+131a 0+60 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .tbss +NOBITS +0+20137a 0+137a 0+20 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .dynamic +DYNAMIC +0+201380 0+1380 0+130 10 +WA +3 +0 +8
- +\[[ 0-9]+\] .got +PROGBITS +0+2014b0 0+14b0 0+90 08 +WA +0 +0 +8
- +\[[ 0-9]+\] .got.plt +PROGBITS +0+201540 0+1540 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .plt +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+201340 0+1340 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+2013a0 0+13a0 0+20 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+2013a0 0+13a0 0+130 10 +WA +3 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+2014d0 0+14d0 0+90 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+201560 0+1560 0+20 08 +WA +0 +0 +8
+\[[ 0-9]+\] .shstrtab +.*
+\[[ 0-9]+\] .symtab +.*
+\[[ 0-9]+\] .strtab +.*
@@ -37,13 +37,13 @@ There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+LOAD +0x0+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x200000
- +LOAD +0x0+131a 0x0+20131a 0x0+20131a 0x0+246 0x0+246 RW +0x200000
- +DYNAMIC +0x0+1380 0x0+201380 0x0+201380 0x0+130 0x0+130 RW +0x8
- +TLS +0x0+131a 0x0+20131a 0x0+20131a 0x0+60 0x0+80 R +0x1
+ +LOAD +0x0+1340 0x0+201340 0x0+201340 0x0+240 0x0+240 RW +0x200000
+ +DYNAMIC +0x0+13a0 0x0+2013a0 0x0+2013a0 0x0+130 0x0+130 RW +0x8
+ +TLS +0x0+1340 0x0+201340 0x0+201340 0x0+60 0x0+80 R +0x1
Section to Segment mapping:
+Segment Sections...
- +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+ +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .text .plt *
+01 +.tdata .dynamic .got .got.plt *
+02 +.dynamic *
+03 +.tdata .tbss *
@@ -72,7 +72,7 @@ Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND *
-.* SECTION +LOCAL +DEFAULT +7 *
+.* SECTION +LOCAL +DEFAULT +6 *
.* SECTION +LOCAL +DEFAULT +8 *
.* TLS +GLOBAL +DEFAULT +8 sg8
.* TLS +GLOBAL +DEFAULT +8 sg3
@@ -80,7 +80,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
.* TLS +GLOBAL +DEFAULT +8 sg5
.* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
.* TLS +GLOBAL +DEFAULT +8 sg1
-.* FUNC +GLOBAL +DEFAULT +7 fn1
+.* FUNC +GLOBAL +DEFAULT +6 fn1
.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
.* TLS +GLOBAL +DEFAULT +8 sg2
.* TLS +GLOBAL +DEFAULT +8 sg6
@@ -137,7 +137,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* TLS +GLOBAL +DEFAULT +8 sg5
.* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
.* TLS +GLOBAL +DEFAULT +8 sg1
-.* FUNC +GLOBAL +DEFAULT +7 fn1
+.* FUNC +GLOBAL +DEFAULT +6 fn1
.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start
.* TLS +GLOBAL +DEFAULT +8 sg2
.* TLS +GLOBAL +DEFAULT +8 sg6