From f60cf82f204ed6f59ced98ca15b5d50ced6d5aea Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 31 May 2013 17:27:28 +0000 Subject: [PATCH] Don't align text/data/bss sections for ELF binutils/testsuite/ * binutils-all/i386/compressed-1b.d: Updated for text/data/bss section alignment change. * binutils-all/i386/compressed-1c.d: Likewise. * binutils-all/x86-64/compressed-1b.d: Likewise. * binutils-all/x86-64/compressed-1c.d: Likewise. gas/ * config/tc-i386.c (md_begin): Don't align text/data/bss sections for ELF. gas/testsuite/ * gas/i386/size-3.d: Updated for text/data/bss section alignment change. * gas/i386/x86-64-size-1.d: Likewise. * gas/i386/x86-64-unwind.d: Likewise. * gas/i386/ilp32/x86-64-size-1.d: Likewise. * gas/i386/ilp32/x86-64-size-5.d: Likewise. * gas/i386/ilp32/x86-64-unwind.d: Likewise. ld/testsuite/ * ld-i386/pr12718.d: Updated for text/data/bss section alignment change. * ld-i386/tlsbindesc.dd: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlspic.dd: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/pr12718.d: Likewise. * ld-x86-64/split-by-file.rd: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsdesc.dd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlspic.rd: Likewise. --- binutils/testsuite/ChangeLog | 8 ++++++++ .../binutils-all/i386/compressed-1b.d | 6 +++--- .../binutils-all/i386/compressed-1c.d | 6 +++--- .../binutils-all/x86-64/compressed-1b.d | 6 +++--- .../binutils-all/x86-64/compressed-1c.d | 6 +++--- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 9 --------- gas/testsuite/ChangeLog | 10 ++++++++++ gas/testsuite/gas/i386/ilp32/x86-64-size-1.d | 4 ++-- gas/testsuite/gas/i386/ilp32/x86-64-size-5.d | 4 ++-- gas/testsuite/gas/i386/ilp32/x86-64-unwind.d | 6 +++--- gas/testsuite/gas/i386/size-3.d | 4 ++-- gas/testsuite/gas/i386/x86-64-size-1.d | 4 ++-- gas/testsuite/gas/i386/x86-64-unwind.d | 6 +++--- ld/testsuite/ChangeLog | 20 +++++++++++++++++++ ld/testsuite/ld-i386/pr12718.d | 2 +- ld/testsuite/ld-i386/tlsbindesc.dd | 3 +-- ld/testsuite/ld-i386/tlsbindesc.rd | 4 ++-- ld/testsuite/ld-i386/tlsnopic.dd | 2 -- ld/testsuite/ld-i386/tlspic.dd | 2 -- ld/testsuite/ld-x86-64/ilp32-4.d | 10 +++++----- ld/testsuite/ld-x86-64/pr12718.d | 2 +- ld/testsuite/ld-x86-64/split-by-file.rd | 10 +++++----- ld/testsuite/ld-x86-64/tlsbin.dd | 1 - ld/testsuite/ld-x86-64/tlsbin.rd | 14 ++++++------- ld/testsuite/ld-x86-64/tlsbindesc.dd | 1 - ld/testsuite/ld-x86-64/tlsbindesc.rd | 16 +++++++-------- ld/testsuite/ld-x86-64/tlsdesc.dd | 1 - ld/testsuite/ld-x86-64/tlsdesc.rd | 10 +++++----- ld/testsuite/ld-x86-64/tlspic.dd | 1 - ld/testsuite/ld-x86-64/tlspic.rd | 10 +++++----- 31 files changed, 109 insertions(+), 84 deletions(-) diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 47d0ced6f6c..ac10932fe22 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-05-31 H.J. Lu + + * binutils-all/i386/compressed-1b.d: Updated for text/data/bss + section alignment change. + * binutils-all/i386/compressed-1c.d: Likewise. + * binutils-all/x86-64/compressed-1b.d: Likewise. + * binutils-all/x86-64/compressed-1c.d: Likewise. + 2013-05-28 Cary Coutant * binutils-all/dw2-1.W: Adjust expected output. diff --git a/binutils/testsuite/binutils-all/i386/compressed-1b.d b/binutils/testsuite/binutils-all/i386/compressed-1b.d index d7ffe21d887..8cc9653eef2 100644 --- a/binutils/testsuite/binutils-all/i386/compressed-1b.d +++ b/binutils/testsuite/binutils-all/i386/compressed-1b.d @@ -11,8 +11,8 @@ Section Headers: \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al \[ 0\] NULL 00000000 000000 000000 00 0 0 0 \[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16 - \[ 2\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4 - \[ 3\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4 - \[ 4\] .shstrtab STRTAB 00000000 00005c 00001c 00 0 0 1 + \[ 2\] .data PROGBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 00000000 00005b 00001c 00 0 0 1 Key to Flags: #... diff --git a/binutils/testsuite/binutils-all/i386/compressed-1c.d b/binutils/testsuite/binutils-all/i386/compressed-1c.d index 3db18fe31c3..f05380fc62e 100644 --- a/binutils/testsuite/binutils-all/i386/compressed-1c.d +++ b/binutils/testsuite/binutils-all/i386/compressed-1c.d @@ -11,8 +11,8 @@ Section Headers: \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al \[ 0\] NULL 00000000 000000 000000 00 0 0 0 \[ 1\] .text PROGBITS 00000000 000040 00001b 00 AX 0 0 16 - \[ 2\] .data PROGBITS 00000000 00005c 000000 00 WA 0 0 4 - \[ 3\] .bss NOBITS 00000000 00005c 000000 00 WA 0 0 4 - \[ 4\] .shstrtab STRTAB 00000000 00005c 00001c 00 0 0 1 + \[ 2\] .data PROGBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 00000000 00005b 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 00000000 00005b 00001c 00 0 0 1 Key to Flags: #... diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1b.d b/binutils/testsuite/binutils-all/x86-64/compressed-1b.d index 078ccb6c6e8..ed5a45eddb2 100644 --- a/binutils/testsuite/binutils-all/x86-64/compressed-1b.d +++ b/binutils/testsuite/binutils-all/x86-64/compressed-1b.d @@ -11,8 +11,8 @@ Section Headers: \[Nr\] Name Type Address Off Size ES Flg Lk Inf Al \[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0 \[ 1\] .text PROGBITS 0000000000000000 000040 000015 00 AX 0 0 16 - \[ 2\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4 - \[ 3\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4 - \[ 4\] .shstrtab STRTAB 0000000000000000 000058 00001c 00 0 0 1 + \[ 2\] .data PROGBITS 0000000000000000 000055 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 0000000000000000 000055 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 0000000000000000 000055 00001c 00 0 0 1 Key to Flags: #... diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1c.d b/binutils/testsuite/binutils-all/x86-64/compressed-1c.d index 90a3c2d7ffd..a0308c89bf9 100644 --- a/binutils/testsuite/binutils-all/x86-64/compressed-1c.d +++ b/binutils/testsuite/binutils-all/x86-64/compressed-1c.d @@ -11,8 +11,8 @@ Section Headers: \[Nr\] Name Type Address Off Size ES Flg Lk Inf Al \[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0 \[ 1\] .text PROGBITS 0000000000000000 000040 000015 00 AX 0 0 16 - \[ 2\] .data PROGBITS 0000000000000000 000058 000000 00 WA 0 0 4 - \[ 3\] .bss NOBITS 0000000000000000 000058 000000 00 WA 0 0 4 - \[ 4\] .shstrtab STRTAB 0000000000000000 000058 00001c 00 0 0 1 + \[ 2\] .data PROGBITS 0000000000000000 000055 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 0000000000000000 000055 000000 00 WA 0 0 1 + \[ 4\] .shstrtab STRTAB 0000000000000000 000055 00001c 00 0 0 1 Key to Flags: #... diff --git a/gas/ChangeLog b/gas/ChangeLog index d80bff8a28e..d429af9c643 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2013-05-31 H.J. Lu + + * config/tc-i386.c (md_begin): Don't align text/data/bss sections + for ELF. + 2013-05-31 Paul Brook gas/ diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index f7d488cf458..eb575998f5c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2454,15 +2454,6 @@ md_begin (void) operand_chars[(unsigned char) *p] = *p; } -#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) - if (IS_ELF) - { - record_alignment (text_section, 2); - record_alignment (data_section, 2); - record_alignment (bss_section, 2); - } -#endif - if (flag_code == CODE_64BIT) { #if defined (OBJ_COFF) && defined (TE_PE) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index f8ae2b8615b..c572d9c551d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2013-05-31 H.J. Lu + + * gas/i386/size-3.d: Updated for text/data/bss section alignment + change. + * gas/i386/x86-64-size-1.d: Likewise. + * gas/i386/x86-64-unwind.d: Likewise. + * gas/i386/ilp32/x86-64-size-1.d: Likewise. + * gas/i386/ilp32/x86-64-size-5.d: Likewise. + * gas/i386/ilp32/x86-64-unwind.d: Likewise. + 2013-05-31 Catherine Moore gas/testsuite/ diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-size-1.d b/gas/testsuite/gas/i386/ilp32/x86-64-size-1.d index 7b0884f4f47..d3e5a13f876 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-size-1.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-size-1.d @@ -3,7 +3,7 @@ #readelf: -r -Relocation section '.rela.text' at offset 0x2e0 contains 9 entries: +Relocation section '.rela.text' at offset 0x2dc contains 9 entries: Offset Info Type Sym.Value Sym. Name \+ Addend 0+1 00000420 R_X86_64_SIZE32 00000000 xxx \+ 0 0+6 00000420 R_X86_64_SIZE32 00000000 xxx - 8 @@ -15,7 +15,7 @@ Relocation section '.rela.text' at offset 0x2e0 contains 9 entries: 0+24 00000620 R_X86_64_SIZE32 00000020 zzz - 20 0+29 00000620 R_X86_64_SIZE32 00000020 zzz \+ 20 -Relocation section '.rela.data' at offset 0x34c contains 3 entries: +Relocation section '.rela.data' at offset 0x348 contains 3 entries: Offset Info Type Sym.Value Sym. Name \+ Addend 0+50 00000420 R_X86_64_SIZE32 00000000 xxx - 1 0+54 00000520 R_X86_64_SIZE32 00000000 yyy \+ 2 diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-size-5.d b/gas/testsuite/gas/i386/ilp32/x86-64-size-5.d index 1c420fa990a..46d38e65aab 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-size-5.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-size-5.d @@ -3,13 +3,13 @@ #readelf: -r -Relocation section '.rela.text' at offset 0x2dc contains 3 entries: +Relocation section '.rela.text' at offset 0x2d8 contains 3 entries: Offset Info Type Sym.Value Sym. Name \+ Addend 0+2 00000421 R_X86_64_SIZE64 00000000 xxx \+ 0 0+c 00000421 R_X86_64_SIZE64 00000000 xxx - 8 0+16 00000421 R_X86_64_SIZE64 00000000 xxx \+ 8 -Relocation section '.rela.data' at offset 0x300 contains 3 entries: +Relocation section '.rela.data' at offset 0x2fc contains 3 entries: Offset Info Type Sym.Value Sym. Name \+ Addend 0+50 00000421 R_X86_64_SIZE64 00000000 xxx - 1 0+58 00000621 R_X86_64_SIZE64 00000000 yyy \+ c8 diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d b/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d index 3c9f88b3fab..d92f9c48756 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-unwind.d @@ -7,9 +7,9 @@ There are 8 section headers, starting at offset 0x74: Section Headers: \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al \[ 0\] NULL 00000000 000000 000000 00 0 0 0 - \[ 1\] .text PROGBITS 00000000 000034 000000 00 AX 0 0 4 - \[ 2\] .data PROGBITS 00000000 000034 000000 00 WA 0 0 4 - \[ 3\] .bss NOBITS 00000000 000034 000000 00 WA 0 0 4 + \[ 1\] .text PROGBITS 00000000 000034 000000 00 AX 0 0 1 + \[ 2\] .data PROGBITS 00000000 000034 000000 00 WA 0 0 1 + \[ 3\] .bss NOBITS 00000000 000034 000000 00 WA 0 0 1 \[ 4\] .eh_frame X86_64_UNWIND 00000000 000034 000008 00 A 0 0 1 \[ 5\] .shstrtab STRTAB 00000000 00003c 000036 00 0 0 1 \[ 6\] .symtab SYMTAB 00000000 0001b4 000050 10 7 5 4 diff --git a/gas/testsuite/gas/i386/size-3.d b/gas/testsuite/gas/i386/size-3.d index 78a9fb61e92..4f01766babe 100644 --- a/gas/testsuite/gas/i386/size-3.d +++ b/gas/testsuite/gas/i386/size-3.d @@ -2,7 +2,7 @@ #readelf: -r -Relocation section '.rel.text' at offset 0x334 contains 6 entries: +Relocation section '.rel.text' at offset 0x330 contains 6 entries: Offset Info Type Sym.Value Sym. Name 0+1 00000626 R_386_SIZE32 00000000 xxx 0+6 00000626 R_386_SIZE32 00000000 xxx @@ -11,7 +11,7 @@ Relocation section '.rel.text' at offset 0x334 contains 6 entries: 0+15 00000726 R_386_SIZE32 00000000 yyy 0+1a 00000726 R_386_SIZE32 00000000 yyy -Relocation section '.rel.tdata' at offset 0x364 contains 2 entries: +Relocation section '.rel.tdata' at offset 0x360 contains 2 entries: Offset Info Type Sym.Value Sym. Name 0+50 00000626 R_386_SIZE32 00000000 xxx 0+54 00000726 R_386_SIZE32 00000000 yyy diff --git a/gas/testsuite/gas/i386/x86-64-size-1.d b/gas/testsuite/gas/i386/x86-64-size-1.d index 03484f8f53a..798229ed43a 100644 --- a/gas/testsuite/gas/i386/x86-64-size-1.d +++ b/gas/testsuite/gas/i386/x86-64-size-1.d @@ -3,7 +3,7 @@ #readelf: -r -Relocation section '.rela.text' at offset 0x400 contains 9 entries: +Relocation section '.rela.text' at offset 0x3f8 contains 9 entries: Offset Info Type Sym. Value Sym. Name \+ Addend 0+1 000400000020 R_X86_64_SIZE32 0000000000000000 xxx \+ 0 0+6 000400000020 R_X86_64_SIZE32 0000000000000000 xxx - 8 @@ -15,7 +15,7 @@ Relocation section '.rela.text' at offset 0x400 contains 9 entries: 0+24 000600000020 R_X86_64_SIZE32 0000000000000020 zzz - 20 0+29 000600000020 R_X86_64_SIZE32 0000000000000020 zzz \+ 20 -Relocation section '.rela.data' at offset 0x4d8 contains 3 entries: +Relocation section '.rela.data' at offset 0x4d0 contains 3 entries: Offset Info Type Sym. Value Sym. Name \+ Addend 0+50 000400000020 R_X86_64_SIZE32 0000000000000000 xxx - 1 0+54 000500000020 R_X86_64_SIZE32 0000000000000000 yyy \+ 2 diff --git a/gas/testsuite/gas/i386/x86-64-unwind.d b/gas/testsuite/gas/i386/x86-64-unwind.d index ce60be44570..fbfc5808178 100644 --- a/gas/testsuite/gas/i386/x86-64-unwind.d +++ b/gas/testsuite/gas/i386/x86-64-unwind.d @@ -9,11 +9,11 @@ Section Headers: \[ 0\] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 \[ 1\] \.text PROGBITS 0000000000000000 00000040 - 0000000000000000 0000000000000000 AX 0 0 4 + 0000000000000000 0000000000000000 AX 0 0 1 \[ 2\] \.data PROGBITS 0000000000000000 00000040 - 0000000000000000 0000000000000000 WA 0 0 4 + 0000000000000000 0000000000000000 WA 0 0 1 \[ 3\] \.bss NOBITS 0000000000000000 00000040 - 0000000000000000 0000000000000000 WA 0 0 4 + 0000000000000000 0000000000000000 WA 0 0 1 \[ 4\] \.eh_frame X86_64_UNWIND 0000000000000000 00000040 0000000000000008 0000000000000000 A 0 0 1 \[ 5\] \.shstrtab STRTAB 0000000000000000 00000048 diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4e932aac7f9..8c4a5f0ca98 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,23 @@ +2013-05-31 H.J. Lu + + * ld-i386/pr12718.d: Updated for text/data/bss section alignment + change. + * ld-i386/tlsbindesc.dd: Likewise. + * ld-i386/tlsbindesc.rd: Likewise. + * ld-i386/tlsnopic.dd: Likewise. + * ld-i386/tlspic.dd: Likewise. + * ld-x86-64/ilp32-4.d: Likewise. + * ld-x86-64/pr12718.d: Likewise. + * ld-x86-64/split-by-file.rd: Likewise. + * ld-x86-64/tlsbin.dd: Likewise. + * ld-x86-64/tlsbin.rd: Likewise. + * ld-x86-64/tlsbindesc.dd: Likewise. + * ld-x86-64/tlsbindesc.rd: Likewise. + * ld-x86-64/tlsdesc.dd: Likewise. + * ld-x86-64/tlsdesc.rd: Likewise. + * ld-x86-64/tlspic.dd: Likewise. + * ld-x86-64/tlspic.rd: Likewise. + 2013-05-29 Maciej W. Rozycki * ld-mips-elf/jalr3.dd: New test. diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d index 61634c8aad3..6bcea85b443 100644 --- a/ld/testsuite/ld-i386/pr12718.d +++ b/ld/testsuite/ld-i386/pr12718.d @@ -8,7 +8,7 @@ There are 5 section headers, starting at offset 0x[0-9a-f]+: Section Headers: +\[Nr\] Name +Type +Addr +Off +Size +ES +Flg +Lk +Inf +Al +\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0 - +\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +4 + +\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +1 +\[ 2\] +.shstrtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ +0+ +0 +0 +1 +\[ 3\] +.symtab +SYMTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 10 +4 +[0-9] +4 +\[ 4\] +.strtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 00 +0 +0 +1 diff --git a/ld/testsuite/ld-i386/tlsbindesc.dd b/ld/testsuite/ld-i386/tlsbindesc.dd index 04a37a1d53f..cf35c71a7bc 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.dd +++ b/ld/testsuite/ld-i386/tlsbindesc.dd @@ -223,14 +223,13 @@ Disassembly of section .text: +[0-9a-f]+: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx +[0-9a-f]+: c9[ ]+leave * +[0-9a-f]+: c3[ ]+ret * - +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax [0-9a-f]+ <_start>: +[0-9a-f]+: 55[ ]+push %ebp +[0-9a-f]+: 89 e5[ ]+mov %esp,%ebp +[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <_start\+0x8> +[0-9a-f]+: 59[ ]+pop %ecx - +[0-9a-f]+: 81 c1 ([0-9a-f]{2} ){4}[ ]+add \$0x[0-9a-f]*fa4,%ecx + +[0-9a-f]+: 81 c1 ([0-9a-f]{2} ){4}[ ]+add \$0x[0-9a-f]*fa6,%ecx +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * diff --git a/ld/testsuite/ld-i386/tlsbindesc.rd b/ld/testsuite/ld-i386/tlsbindesc.rd index 7fa8a4a88a3..894b2020743 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.rd +++ b/ld/testsuite/ld-i386/tlsbindesc.rd @@ -30,7 +30,7 @@ Key to Flags: .* Elf file type is EXEC \(Executable file\) -Entry point 0x8049158 +Entry point 0x8049156 There are [0-9]+ program headers, starting at offset [0-9]+ Program Headers: @@ -132,7 +132,7 @@ Symbol table '\.symtab' contains [0-9]+ entries: +[0-9]+: 00000058 +0 +TLS +GLOBAL +HIDDEN +7 sh7 +[0-9]+: 0000005c +0 +TLS +GLOBAL +HIDDEN +7 sh8 +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1 - +[0-9]+: 0+8049158 +0 +FUNC +GLOBAL +DEFAULT +6 _start + +[0-9]+: 0+8049156 +0 +FUNC +GLOBAL +DEFAULT +6 _start +[0-9]+: 0000004c +0 +TLS +GLOBAL +HIDDEN +7 sh4 +[0-9]+: 00000078 +0 +TLS +GLOBAL +DEFAULT +8 bg7 +[0-9]+: 00000050 +0 +TLS +GLOBAL +HIDDEN +7 sh5 diff --git a/ld/testsuite/ld-i386/tlsnopic.dd b/ld/testsuite/ld-i386/tlsnopic.dd index bd18de35db4..10d24a47975 100644 --- a/ld/testsuite/ld-i386/tlsnopic.dd +++ b/ld/testsuite/ld-i386/tlsnopic.dd @@ -156,5 +156,3 @@ Disassembly of section .text: +[0-9a-f]+: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx +[0-9a-f]+: c9[ ]+leave * +[0-9a-f]+: c3[ ]+ret * - +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax - +[0-9a-f]+: 90[ ]+nop diff --git a/ld/testsuite/ld-i386/tlspic.dd b/ld/testsuite/ld-i386/tlspic.dd index 6746821a475..0c697d3fe06 100644 --- a/ld/testsuite/ld-i386/tlspic.dd +++ b/ld/testsuite/ld-i386/tlspic.dd @@ -406,5 +406,3 @@ Disassembly of section .text: +[0-9a-f]+: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx +[0-9a-f]+: c9[ ]+leave * +[0-9a-f]+: c3[ ]+ret * - +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax - +[0-9a-f]+: 90[ ]+nop diff --git a/ld/testsuite/ld-x86-64/ilp32-4.d b/ld/testsuite/ld-x86-64/ilp32-4.d index 54041f1992b..94c1e82e3aa 100644 --- a/ld/testsuite/ld-x86-64/ilp32-4.d +++ b/ld/testsuite/ld-x86-64/ilp32-4.d @@ -3,7 +3,7 @@ #readelf: -d -S --wide #target: x86_64-*-linux* -There are 9 section headers, starting at offset 0x1d8: +There are 9 section headers, starting at offset 0x1d4: Section Headers: \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al @@ -11,9 +11,9 @@ Section Headers: \[ 1\] .hash HASH 00000094 000094 00002c 04 A 2 0 4 \[ 2\] .dynsym DYNSYM 000000c0 0000c0 000060 10 A 3 2 4 \[ 3\] .dynstr STRTAB 00000120 000120 000019 00 A 0 0 1 - \[ 4\] .text PROGBITS 0000013c 00013c 000001 00 AX 0 0 4 - \[ 5\] .dynamic DYNAMIC 00200140 000140 000058 08 WA 3 0 4 - \[ 6\] .shstrtab STRTAB 00000000 000198 000040 00 0 0 1 + \[ 4\] .text PROGBITS 00000139 000139 000001 00 AX 0 0 1 + \[ 5\] .dynamic DYNAMIC 0020013c 00013c 000058 08 WA 3 0 4 + \[ 6\] .shstrtab STRTAB 00000000 000194 000040 00 0 0 1 \[ 7\] .symtab SYMTAB 00000000 [0-9a-f]+ [0-9a-f]+ 10 8 [0-9] 4 \[ 8\] .strtab STRTAB 00000000 [0-9a-f]+ [0-9a-f]+ 00 0 0 1 Key to Flags: @@ -21,7 +21,7 @@ Key to Flags: I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\) O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) -Dynamic section at offset 0x140 contains 6 entries: +Dynamic section at offset 0x13c contains 6 entries: Tag Type Name/Value 0x00000004 \(HASH\) 0x94 0x00000005 \(STRTAB\) 0x120 diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d index 1f1a16ebaed..8e2865192b2 100644 --- a/ld/testsuite/ld-x86-64/pr12718.d +++ b/ld/testsuite/ld-x86-64/pr12718.d @@ -8,7 +8,7 @@ There are 5 section headers, starting at offset 0x[0-9a-f]+: Section Headers: +\[Nr\] Name +Type +Address +Off +Size +ES +Flg +Lk +Inf +Al +\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0 - +\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +4 + +\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +1 +\[ 2\] +.shstrtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ +0+ +0 +0 +1 +\[ 3\] +.symtab +SYMTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 18 +4 +[0-9] +8 +\[ 4\] +.strtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 00 +0 +0 +1 diff --git a/ld/testsuite/ld-x86-64/split-by-file.rd b/ld/testsuite/ld-x86-64/split-by-file.rd index 897ab0f806c..6cc810133e1 100644 --- a/ld/testsuite/ld-x86-64/split-by-file.rd +++ b/ld/testsuite/ld-x86-64/split-by-file.rd @@ -3,12 +3,12 @@ There are 9 section headers, starting at offset 0x80: Section Headers: \[Nr\] Name Type Address Off Size ES Flg Lk Inf Al \[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0 - \[ 1\] .text PROGBITS 0000000000000000 000040 000000 00 AX 0 0 4 + \[ 1\] .text PROGBITS 0000000000000000 000040 000000 00 AX 0 0 1 \[ 2\] .foo PROGBITS 0000000000000000 000040 000003 00 AXl 0 0 1 - \[ 3\] .data PROGBITS 0000000000000000 000044 000000 00 WA 0 0 4 - \[ 4\] .bss NOBITS 0000000000000000 000044 000000 00 WA 0 0 4 - \[ 5\] .foo.0 PROGBITS 0000000000000003 000044 000003 00 AXl 0 0 1 - \[ 6\] .shstrtab STRTAB 0000000000000000 000047 000038 00 0 0 1 + \[ 3\] .data PROGBITS 0000000000000000 000043 000000 00 WA 0 0 1 + \[ 4\] .bss NOBITS 0000000000000000 000043 000000 00 WA 0 0 1 + \[ 5\] .foo.0 PROGBITS 0000000000000003 000043 000003 00 AXl 0 0 1 + \[ 6\] .shstrtab STRTAB 0000000000000000 000046 000038 00 0 0 1 \[ 7\] .symtab SYMTAB 0000000000000000 [0-9a-f]+ [0-9a-f]+ 18 8 [0-9] 8 \[ 8\] .strtab STRTAB 0000000000000000 [0-9a-f]+ [0-9a-f]+ 00 0 0 1 Key to Flags: diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd index a2ad193d164..a9b1227e585 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.dd +++ b/ld/testsuite/ld-x86-64/tlsbin.dd @@ -174,7 +174,6 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: c9[ ]+leaveq * +[0-9a-f]+: c3[ ]+retq * - +[0-9a-f]+: 0f 1f 00[ ]+nopl \(%rax\) [0-9a-f]+ <_start>: +[0-9a-f]+: 55[ ]+push %rbp diff --git a/ld/testsuite/ld-x86-64/tlsbin.rd b/ld/testsuite/ld-x86-64/tlsbin.rd index e3285a3e7e7..df5e8555eb9 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.rd +++ b/ld/testsuite/ld-x86-64/tlsbin.rd @@ -17,9 +17,9 @@ Section Headers: +\[[ 0-9]+\] .rela.dyn +.* +\[[ 0-9]+\] .rela.plt +.* +\[[ 0-9]+\] .plt +.* - +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+234 00 +AX +0 +0 +4096 - +\[[ 0-9]+\] .tdata +PROGBITS +0+601234 0+1234 0+60 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .tbss +NOBITS +0+601294 0+1294 0+40 00 WAT +0 +0 +1 + +\[[ 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 @@ -32,7 +32,7 @@ Key to Flags: .* Elf file type is EXEC \(Executable file\) -Entry point 0x40113c +Entry point 0x401139 There are [0-9]+ program headers, starting at offset [0-9]+ Program Headers: @@ -40,10 +40,10 @@ Program Headers: +PHDR.* +INTERP.* .*Requesting program interpreter.* - +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+1234 0x0+1234 R E 0x200000 - +LOAD +0x0+1234 0x0+601234 0x0+601234 0x0+1e4 0x0+1e4 RW +0x200000 + +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+1234 0x0+601234 0x0+601234 0x0+60 0x0+a0 R +0x1 + +TLS +0x0+1231 0x0+601231 0x0+601231 0x0+60 0x0+a0 R +0x1 Section to Segment mapping: +Segment Sections... diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.dd b/ld/testsuite/ld-x86-64/tlsbindesc.dd index 166ec94840f..f77ebf2536f 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.dd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.dd @@ -165,7 +165,6 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: c9[ ]+leaveq * +[0-9a-f]+: c3[ ]+retq * - +[0-9a-f]+: 0f 1f 00[ ]+nopl \(%rax\) [0-9a-f]+ <_start>: +[0-9a-f]+: 55[ ]+push %rbp diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.rd b/ld/testsuite/ld-x86-64/tlsbindesc.rd index 475535c25aa..7a2c484e3b0 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.rd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.rd @@ -15,9 +15,9 @@ Section Headers: +\[[ 0-9]+\] .dynsym +.* +\[[ 0-9]+\] .dynstr +.* +\[[ 0-9]+\] .rela.dyn +.* - +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+200 00 +AX +0 +0 +4096 - +\[[ 0-9]+\] .tdata +PROGBITS +0+601200 0+1200 0+60 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .tbss +NOBITS +0+601260 0+1260 0+40 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+1fd 00 +AX +0 +0 +4096 + +\[[ 0-9]+\] .tdata +PROGBITS +0+6011fd 0+11fd 0+60 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .tbss +NOBITS +0+60125d 0+125d 0+40 00 WAT +0 +0 +1 +\[[ 0-9]+\] .dynamic +DYNAMIC +0+601260 0+1260 0+100 10 +WA +4 +0 +8 +\[[ 0-9]+\] .got +PROGBITS +0+601360 0+1360 0+20 08 +WA +0 +0 +8 +\[[ 0-9]+\] .got.plt +PROGBITS +0+601380 0+1380 0+18 08 +WA +0 +0 +8 @@ -30,7 +30,7 @@ Key to Flags: .* Elf file type is EXEC \(Executable file\) -Entry point 0x401108 +Entry point 0x401105 There are [0-9]+ program headers, starting at offset [0-9]+ Program Headers: @@ -38,10 +38,10 @@ Program Headers: +PHDR.* +INTERP.* .*Requesting program interpreter.* - +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+1200 0x0+1200 R E 0x200000 - +LOAD +0x0+1200 0x0+601200 0x0+601200 0x0+198 0x0+198 RW +0x200000 + +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+11fd 0x0+11fd R E 0x200000 + +LOAD +0x0+11fd 0x0+6011fd 0x0+6011fd 0x0+19b 0x0+19b RW +0x200000 +DYNAMIC +0x0+1260 0x0+601260 0x0+601260 0x0+100 0x0+100 RW +0x8 - +TLS +0x0+1200 0x0+601200 0x0+601200 0x0+60 0x0+a0 R +0x1 + +TLS +0x0+11fd 0x0+6011fd 0x0+6011fd 0x0+60 0x0+a0 R +0x1 Section to Segment mapping: +Segment Sections... @@ -120,7 +120,7 @@ Symbol table '\.symtab' contains [0-9]+ entries: +[0-9]+: 0+58 +0 +TLS +GLOBAL +HIDDEN +7 sh7 +[0-9]+: 0+5c +0 +TLS +GLOBAL +HIDDEN +7 sh8 +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1 - +[0-9]+: 0+401108 +0 +FUNC +GLOBAL +DEFAULT +6 _start + +[0-9]+: 0+401105 +0 +FUNC +GLOBAL +DEFAULT +6 _start +[0-9]+: 0+4c +0 +TLS +GLOBAL +HIDDEN +7 sh4 +[0-9]+: 0+78 +0 +TLS +GLOBAL +DEFAULT +8 bg7 +[0-9]+: 0+50 +0 +TLS +GLOBAL +HIDDEN +7 sh5 diff --git a/ld/testsuite/ld-x86-64/tlsdesc.dd b/ld/testsuite/ld-x86-64/tlsdesc.dd index 9f3fcbe78a6..a6f22b6fffa 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.dd +++ b/ld/testsuite/ld-x86-64/tlsdesc.dd @@ -197,4 +197,3 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: c9[ ]+leaveq * +[0-9a-f]+: c3[ ]+retq * - +[0-9a-f]+: 90[ ]+nop * diff --git a/ld/testsuite/ld-x86-64/tlsdesc.rd b/ld/testsuite/ld-x86-64/tlsdesc.rd index fd576a7cbe9..ee43ee2a588 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.rd +++ b/ld/testsuite/ld-x86-64/tlsdesc.rd @@ -16,9 +16,9 @@ Section Headers: +\[[ 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+154 00 +AX +0 +0 4096 - +\[[ 0-9]+\] .tdata +PROGBITS +0+201154 0+1154 0+60 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .tbss +NOBITS +0+2011b4 0+11b4 0+20 00 WAT +0 +0 +1 + +\[[ 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 @@ -37,9 +37,9 @@ 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+1154 0x0+201154 0x0+201154 0x0+264 0x0+264 RW +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+1154 0x0+201154 0x0+201154 0x0+60 0x0+80 R +0x1 + +TLS +0x0+1153 0x0+201153 0x0+201153 0x0+60 0x0+80 R +0x1 Section to Segment mapping: +Segment Sections... diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd index 93baac0cc85..8b5b5fcd6e7 100644 --- a/ld/testsuite/ld-x86-64/tlspic.dd +++ b/ld/testsuite/ld-x86-64/tlspic.dd @@ -226,4 +226,3 @@ Disassembly of section .text: +11a7: 90[ ]+nop * +11a8: c9[ ]+leaveq * +11a9: c3[ ]+retq * - +11aa: 66 90[ ]+xchg %ax,%ax diff --git a/ld/testsuite/ld-x86-64/tlspic.rd b/ld/testsuite/ld-x86-64/tlspic.rd index fb6a22953aa..e54e20fe0ed 100644 --- a/ld/testsuite/ld-x86-64/tlspic.rd +++ b/ld/testsuite/ld-x86-64/tlspic.rd @@ -16,9 +16,9 @@ Section Headers: +\[[ 0-9]+\] .rela.dyn +.* +\[[ 0-9]+\] .rela.plt +.* +\[[ 0-9]+\] .plt +.* - +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1ac 00 +AX +0 +0 4096 - +\[[ 0-9]+\] .tdata +PROGBITS +0+2011ac 0+11ac 0+60 00 WAT +0 +0 +1 - +\[[ 0-9]+\] .tbss +NOBITS +0+20120c 0+120c 0+20 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1aa 00 +AX +0 +0 4096 + +\[[ 0-9]+\] .tdata +PROGBITS +0+2011aa 0+11aa 0+60 00 WAT +0 +0 +1 + +\[[ 0-9]+\] .tbss +NOBITS +0+20120a 0+120a 0+20 00 WAT +0 +0 +1 +\[[ 0-9]+\] .dynamic +DYNAMIC +0+201210 0+1210 0+130 10 +WA +3 +0 +8 +\[[ 0-9]+\] .got +PROGBITS +0+201340 0+1340 0+90 08 +WA +0 +0 +8 +\[[ 0-9]+\] .got.plt +PROGBITS +0+2013d0 0+13d0 0+20 08 +WA +0 +0 +8 @@ -37,9 +37,9 @@ 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+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000 + +LOAD +0x0+11aa 0x0+2011aa 0x0+2011aa 0x0+246 0x0+246 RW +0x200000 +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8 - +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1 + +TLS +0x0+11aa 0x0+2011aa 0x0+2011aa 0x0+60 0x0+80 R +0x1 Section to Segment mapping: +Segment Sections... -- 2.30.2