From: Alan Modra Date: Thu, 22 Jan 2026 02:37:51 +0000 (+1030) Subject: libgot-1 testcases X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df865c395a62fed6b954bef6311f7ff2d8121e9d;p=thirdparty%2Fbinutils-gdb.git libgot-1 testcases There is no need for multiple tests of readelf --got-contents, nor should the matching be so strict that changes in section layout force editing of the testsuite. It also looks to me that the i386 --got-contents output is wrong, at least it is confusing to have .rel.plt show 0020020c 00000307 R_386_JUMP_SLOT 00000000 bar while the corresponding got-contents dump shows "bar + 156". 3: 0020020c R_386_JUMP_SLOT bar + 156 * testsuite/ld-i386/binutils.exp: Reduce number of tests. * testsuite/ld-i386/libgot-1.rd: New. * testsuite/ld-i386/libgot-1a.rd, * testsuite/ld-i386/libgot-1b.rd, * testsuite/ld-i386/libgot-1c.rd, * testsuite/ld-i386/libgot-1d.rd: Delete. * testsuite/ld-x86-64/binutils.exp: Reduce number of tests. * testsuite/ld-x86-64/libgot-1.rd: New. * testsuite/ld-x86-64/libgot-1a.rd, * testsuite/ld-x86-64/libgot-1b.rd, * testsuite/ld-x86-64/libgot-1c.rd, * testsuite/ld-x86-64/libgot-1d.rd: Delete. * testsuite/ld-x86-64/libgot-1-x32.rd: New. * testsuite/ld-x86-64/libgot-1a-x32.rd, * testsuite/ld-x86-64/libgot-1b-x32.rd, * testsuite/ld-x86-64/libgot-1c-x32.rd, * testsuite/ld-x86-64/libgot-1d-x32.rd: Delete. --- diff --git a/ld/testsuite/ld-i386/binutils.exp b/ld/testsuite/ld-i386/binutils.exp index 29e6aa7510f..40bbeacdf15 100644 --- a/ld/testsuite/ld-i386/binutils.exp +++ b/ld/testsuite/ld-i386/binutils.exp @@ -39,10 +39,7 @@ if { $status == 0 } { "" \ "--32 -mx86-used-note=no --generate-missing-build-notes=no" \ {got-1.s} \ - {{readelf -rW libgot-1a.rd} \ - {readelf -aW libgot-1b.rd} \ - {readelf --got-contents libgot-1c.rd} \ - {readelf {--got-contents -W} libgot-1d.rd}} \ + {{readelf {-rW --got-contents} libgot-1.rd}} \ "libgot-1-i386.so" \ ] \ ] diff --git a/ld/testsuite/ld-i386/libgot-1.rd b/ld/testsuite/ld-i386/libgot-1.rd new file mode 100644 index 00000000000..6ff3d7d7b60 --- /dev/null +++ b/ld/testsuite/ld-i386/libgot-1.rd @@ -0,0 +1,18 @@ +Relocation section '\.rel\.dyn' .* contains 1 entry: +.* +.* R_386_GLOB_DAT +0+ +foo + +Relocation section '\.rel\.plt' .* contains 1 entry: +.* +.* R_386_JUMP_SLOT +0+ +bar + +Global Offset Table '\.got' contains 1 entry: +.* +.* R_386_GLOB_DAT +foo \+ 0 + +Global Offset Table '\.got\.plt' contains 4 entries: +.* +.* +[^0][0-9a-f]+ +.* +0 +.* +0 +.* R_386_JUMP_SLOT +bar \+ 156 diff --git a/ld/testsuite/ld-i386/libgot-1a.rd b/ld/testsuite/ld-i386/libgot-1a.rd deleted file mode 100644 index b8609b8fbe2..00000000000 --- a/ld/testsuite/ld-i386/libgot-1a.rd +++ /dev/null @@ -1,9 +0,0 @@ - -Relocation section '.rel.dyn' at offset 0x128 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name -0+2001fc 00000206 R_386_GLOB_DAT 00000000 foo - -Relocation section '.rel.plt' at offset 0x130 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name -0+20020c 00000307 R_386_JUMP_SLOT 00000000 bar -#pass diff --git a/ld/testsuite/ld-i386/libgot-1b.rd b/ld/testsuite/ld-i386/libgot-1b.rd deleted file mode 100644 index faebdb49e0d..00000000000 --- a/ld/testsuite/ld-i386/libgot-1b.rd +++ /dev/null @@ -1,119 +0,0 @@ -ELF Header: - Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 - Class: ELF32 - Data: 2's complement, little endian - Version: 1 \(current\) - OS/ABI: UNIX - System V - ABI Version: 0 - Type: DYN \(Shared object file\) - Machine: Intel 80386 - Version: 0x1 - Entry point address: 0x0 - Start of program headers: 52 \(bytes into file\) - Start of section headers: 768 \(bytes into file\) - Flags: 0x0 - Size of this header: 52 \(bytes\) - Size of program headers: 32 \(bytes\) - Number of program headers: 4 - Size of section headers: 40 \(bytes\) - Number of section headers: 14 - Section header string table index: 13 - -Section Headers: - \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al - \[ 0\] NULL 00000000 000000 000000 00 0 0 0 - \[ 1\] .hash HASH 000000b4 0000b4 000024 04 A 2 0 4 - \[ 2\] .dynsym DYNSYM 000000d8 0000d8 000040 10 A 3 1 4 - \[ 3\] .dynstr STRTAB 00000118 000118 00000e 00 A 0 0 1 - \[ 4\] .rel.dyn REL 00000128 000128 000008 08 A 2 0 4 - \[ 5\] .rel.plt REL 00000130 000130 000008 08 AI 2 10 4 - \[ 6\] .plt PROGBITS 00000140 000140 000020 04 AX 0 0 16 - \[ 7\] .text PROGBITS 00000160 000160 00000b 00 AX 0 0 1 - \[ 8\] .dynamic DYNAMIC 0020016c 00016c 000090 08 WA 3 0 4 - \[ 9\] .got PROGBITS 002001fc 0001fc 000004 04 WA 0 0 4 - \[10\] .got.plt PROGBITS 00200200 000200 000010 04 WA 0 0 4 - \[11\] .symtab SYMTAB 00000000 000210 000060 10 12 3 4 - \[12\] .strtab STRTAB 00000000 000270 00002d 00 0 0 1 - \[13\] .shstrtab STRTAB 00000000 00029d 000060 00 0 0 1 -Key to Flags: - W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), I \(info\), - L \(link order\), O \(extra OS processing required\), G \(group\), T \(TLS\), - C \(compressed\), x \(unknown\), o \(OS specific\), E \(exclude\), - D \(mbind\), p \(processor specific\) - -There are no section groups in this file. - -Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - LOAD 0x000000 0x00000000 0x00000000 0x0016b 0x0016b R E 0x200000 - LOAD 0x00016c 0x0020016c 0x0020016c 0x000a4 0x000a4 RW 0x200000 - DYNAMIC 0x00016c 0x0020016c 0x0020016c 0x00090 0x00090 RW 0x4 - GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 - - Section to Segment mapping: - Segment Sections... - 00 .hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text - 01 .dynamic .got .got.plt - 02 .dynamic - 03 - -Dynamic section at offset 0x16c contains 13 entries: - Tag Type Name/Value - 0x00000004 \(HASH\) 0xb4 - 0x00000005 \(STRTAB\) 0x118 - 0x00000006 \(SYMTAB\) 0xd8 - 0x0000000a \(STRSZ\) 14 \(bytes\) - 0x0000000b \(SYMENT\) 16 \(bytes\) - 0x00000003 \(PLTGOT\) 0x200200 - 0x00000002 \(PLTRELSZ\) 8 \(bytes\) - 0x00000014 \(PLTREL\) REL - 0x00000017 \(JMPREL\) 0x130 - 0x00000011 \(REL\) 0x128 - 0x00000012 \(RELSZ\) 8 \(bytes\) - 0x00000013 \(RELENT\) 8 \(bytes\) - 0x00000000 \(NULL\) 0x0 - -Relocation section '.rel.dyn' at offset 0x128 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name -0+2001fc 00000206 R_386_GLOB_DAT 00000000 foo - -Relocation section '.rel.plt' at offset 0x130 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name -0+20020c 00000307 R_386_JUMP_SLOT 00000000 bar -No processor specific unwind information to decode - -Symbol table '.dynsym' contains 4 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 00000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 00000160 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Symbol table '.symtab' contains 6 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 00000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 0020016c 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC - +[a-f0-9]+: 00200200 0 OBJECT LOCAL DEFAULT 10 _GLOBAL_OFFSET_TABLE_ - +[a-f0-9]+: 00000160 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Histogram for bucket list length \(total of 3 buckets\): - Length Number % of total Coverage - 0 1 \( 33.3%\) - 1 1 \( 33.3%\) 33.3% - 2 1 \( 33.3%\) 100.0% - -No version information found in this file. - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 002001fc R_386_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 20016c - +[0-9]+: 00200204 0 - +[0-9]+: 00200208 0 - +[0-9]+: 0020020c R_386_JUMP_SLOT bar \+ 156 -#pass diff --git a/ld/testsuite/ld-i386/libgot-1c.rd b/ld/testsuite/ld-i386/libgot-1c.rd deleted file mode 100644 index 374b03f1658..00000000000 --- a/ld/testsuite/ld-i386/libgot-1c.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 002001fc R_386_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 20016c - +[0-9]+: 00200204 0 - +[0-9]+: 00200208 0 - +[0-9]+: 0020020c R_386_JUMP_SLOT bar \+ 156 -#pass diff --git a/ld/testsuite/ld-i386/libgot-1d.rd b/ld/testsuite/ld-i386/libgot-1d.rd deleted file mode 100644 index 632b47be743..00000000000 --- a/ld/testsuite/ld-i386/libgot-1d.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 002001fc R_386_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 20016c - +[0-9]+: 00200204 0 - +[0-9]+: 00200208 0 - +[0-9]+: 0020020c R_386_JUMP_SLOT bar \+ 156 -#pass diff --git a/ld/testsuite/ld-x86-64/binutils.exp b/ld/testsuite/ld-x86-64/binutils.exp index 4d04ef6bced..beac28faecb 100644 --- a/ld/testsuite/ld-x86-64/binutils.exp +++ b/ld/testsuite/ld-x86-64/binutils.exp @@ -32,7 +32,7 @@ set status [catch "exec $LD -V -melf_x86_64" got] if { $status == 0 } { run_ld_link_tests [list \ [list \ - "Build libgot-1-x64.so" \ + "Build libgot-1-x64.so" \ "-shared -melf_x86_64 --no-ld-generated-unwind-info \ -z noseparate-code -z max-page-size=0x200000 \ --hash-style=sysv -z nomark-plt $NO_DT_RELR_LDFLAGS \ @@ -40,10 +40,7 @@ if { $status == 0 } { "" \ "--64 -mx86-used-note=no --generate-missing-build-notes=no" \ {got-1.s} \ - {{readelf -rW libgot-1a.rd} \ - {readelf -aW libgot-1b.rd} \ - {readelf --got-contents libgot-1c.rd} \ - {readelf {--got-contents -W} libgot-1d.rd}} \ + {{readelf {-rW --got-contents} libgot-1.rd}} \ "libgot-1-x64.so" \ ] \ ] @@ -62,10 +59,7 @@ if { $status == 0 } { "" \ "--x32 -mx86-used-note=no --generate-missing-build-notes=no" \ {got-1.s} \ - {{readelf -rW libgot-1a-x32.rd} \ - {readelf -aW libgot-1b-x32.rd} \ - {readelf --got-contents libgot-1c-x32.rd} \ - {readelf {--got-contents -W} libgot-1d-x32.rd}} \ + {{readelf {-rW --got-contents} libgot-1-x32.rd}} \ "libgot-1-x32.so" \ ] \ ] diff --git a/ld/testsuite/ld-x86-64/libgot-1-x32.rd b/ld/testsuite/ld-x86-64/libgot-1-x32.rd new file mode 100644 index 00000000000..36c503ab5c9 --- /dev/null +++ b/ld/testsuite/ld-x86-64/libgot-1-x32.rd @@ -0,0 +1,18 @@ +Relocation section '\.rela\.dyn' .* contains 1 entry: +.* +.* R_X86_64_GLOB_DAT +0+ +foo \+ 0 + +Relocation section '\.rela\.plt' .* contains 1 entry: +.* +.* R_X86_64_JUMP_SLOT +0+ +bar \+ 0 + +Global Offset Table '\.got' contains 1 entry: +.* +.* R_X86_64_GLOB_DAT +foo \+ 0 + +Global Offset Table '\.got\.plt' contains 4 entries: +.* +.* [^0][0-9a-f]+ +.* 0 +.* 0 +.* R_X86_64_JUMP_SLOT +bar \+ 0 diff --git a/ld/testsuite/ld-x86-64/libgot-1.rd b/ld/testsuite/ld-x86-64/libgot-1.rd new file mode 100644 index 00000000000..4832b3a1e79 --- /dev/null +++ b/ld/testsuite/ld-x86-64/libgot-1.rd @@ -0,0 +1,18 @@ +Relocation section '\.rela\.dyn' .* contains 1 entry: +.* +.* R_X86_64_GLOB_DAT +0+ foo \+ 0 + +Relocation section '\.rela\.plt' .* contains 1 entry: +.* +.* R_X86_64_JUMP_SLOT +0+ bar \+ 0 + +Global Offset Table '\.got' contains 1 entry: +.* +.* R_X86_64_GLOB_DAT +foo \+ 0 + +Global Offset Table '\.got\.plt' contains 4 entries: +.* +.* [^0][0-9a-f]+ +.* 0 +.* 0 +.* R_X86_64_JUMP_SLOT +bar \+ 0 diff --git a/ld/testsuite/ld-x86-64/libgot-1a-x32.rd b/ld/testsuite/ld-x86-64/libgot-1a-x32.rd deleted file mode 100644 index 6861d6588d6..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1a-x32.rd +++ /dev/null @@ -1,9 +0,0 @@ - -Relocation section '.rela.dyn' at offset 0x128 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name \+ Addend -0+200200 00000206 R_X86_64_GLOB_DAT 00000000 foo \+ 0 - -Relocation section '.rela.plt' at offset 0x134 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name \+ Addend -0+200220 00000307 R_X86_64_JUMP_SLOT 00000000 bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1a.rd b/ld/testsuite/ld-x86-64/libgot-1a.rd deleted file mode 100644 index 8ed447003c7..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1a.rd +++ /dev/null @@ -1,9 +0,0 @@ - -Relocation section '.rela.dyn' at offset 0x1b8 contains 1 entry: - Offset Info Type Symbol's Value Symbol's Name \+ Addend -0+200340 0000000200000006 R_X86_64_GLOB_DAT 0000000000000000 foo \+ 0 - -Relocation section '.rela.plt' at offset 0x1d0 contains 1 entry: - Offset Info Type Symbol's Value Symbol's Name \+ Addend -0+200360 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1b-x32.rd b/ld/testsuite/ld-x86-64/libgot-1b-x32.rd deleted file mode 100644 index f900303fcce..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1b-x32.rd +++ /dev/null @@ -1,119 +0,0 @@ -ELF Header: - Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 - Class: ELF32 - Data: 2's complement, little endian - Version: 1 \(current\) - OS/ABI: UNIX - System V - ABI Version: 0 - Type: DYN \(Shared object file\) - Machine: Advanced Micro Devices X86-64 - Version: 0x1 - Entry point address: 0x0 - Start of program headers: 52 \(bytes into file\) - Start of section headers: 792 \(bytes into file\) - Flags: 0x0 - Size of this header: 52 \(bytes\) - Size of program headers: 32 \(bytes\) - Number of program headers: 4 - Size of section headers: 40 \(bytes\) - Number of section headers: 14 - Section header string table index: 13 - -Section Headers: - \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al - \[ 0\] NULL 00000000 000000 000000 00 0 0 0 - \[ 1\] .hash HASH 000000b4 0000b4 000024 04 A 2 0 4 - \[ 2\] .dynsym DYNSYM 000000d8 0000d8 000040 10 A 3 1 4 - \[ 3\] .dynstr STRTAB 00000118 000118 00000e 00 A 0 0 1 - \[ 4\] .rela.dyn RELA 00000128 000128 00000c 0c A 2 0 4 - \[ 5\] .rela.plt RELA 00000134 000134 00000c 0c AI 2 10 4 - \[ 6\] .plt PROGBITS 00000140 000140 000020 10 AX 0 0 16 - \[ 7\] .text PROGBITS 00000160 000160 00000b 00 AX 0 0 1 - \[ 8\] .dynamic DYNAMIC 0020016c 00016c 000090 08 WA 3 0 4 - \[ 9\] .got PROGBITS 00200200 000200 000008 08 WA 0 0 8 - \[10\] .got.plt PROGBITS 00200208 000208 000020 08 WA 0 0 8 - \[11\] .symtab SYMTAB 00000000 000228 000060 10 12 3 4 - \[12\] .strtab STRTAB 00000000 000288 00002d 00 0 0 1 - \[13\] .shstrtab STRTAB 00000000 0002b5 000062 00 0 0 1 -Key to Flags: - W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), I \(info\), - L \(link order\), O \(extra OS processing required\), G \(group\), T \(TLS\), - C \(compressed\), x \(unknown\), o \(OS specific\), E \(exclude\), - D \(mbind\), l \(large\), p \(processor specific\) - -There are no section groups in this file. - -Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - LOAD 0x000000 0x00000000 0x00000000 0x0016b 0x0016b R E 0x200000 - LOAD 0x00016c 0x0020016c 0x0020016c 0x000bc 0x000bc RW 0x200000 - DYNAMIC 0x00016c 0x0020016c 0x0020016c 0x00090 0x00090 RW 0x4 - GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 - - Section to Segment mapping: - Segment Sections... - 00 .hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text - 01 .dynamic .got .got.plt - 02 .dynamic - 03 - -Dynamic section at offset 0x16c contains 13 entries: - Tag Type Name/Value - 0x00000004 \(HASH\) 0xb4 - 0x00000005 \(STRTAB\) 0x118 - 0x00000006 \(SYMTAB\) 0xd8 - 0x0000000a \(STRSZ\) 14 \(bytes\) - 0x0000000b \(SYMENT\) 16 \(bytes\) - 0x00000003 \(PLTGOT\) 0x200208 - 0x00000002 \(PLTRELSZ\) 12 \(bytes\) - 0x00000014 \(PLTREL\) RELA - 0x00000017 \(JMPREL\) 0x134 - 0x00000007 \(RELA\) 0x128 - 0x00000008 \(RELASZ\) 12 \(bytes\) - 0x00000009 \(RELAENT\) 12 \(bytes\) - 0x00000000 \(NULL\) 0x0 - -Relocation section '.rela.dyn' at offset 0x128 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name \+ Addend -0+200200 00000206 R_X86_64_GLOB_DAT 00000000 foo \+ 0 - -Relocation section '.rela.plt' at offset 0x134 contains 1 entry: - Offset Info Type Sym. Value Symbol's Name \+ Addend -0+200220 00000307 R_X86_64_JUMP_SLOT 00000000 bar \+ 0 -No processor specific unwind information to decode - -Symbol table '.dynsym' contains 4 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 00000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 00000160 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Symbol table '.symtab' contains 6 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 00000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 0020016c 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC - +[a-f0-9]+: 00200208 0 OBJECT LOCAL DEFAULT 10 _GLOBAL_OFFSET_TABLE_ - +[a-f0-9]+: 00000160 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 00000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Histogram for bucket list length \(total of 3 buckets\): - Length Number % of total Coverage - 0 1 \( 33.3%\) - 1 1 \( 33.3%\) 33.3% - 2 1 \( 33.3%\) 100.0% - -No version information found in this file. - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200208 20016c - +[0-9]+: 00200210 0 - +[0-9]+: 00200218 0 - +[0-9]+: 00200220 R_X86_64_JUMP_SLOT bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1b.rd b/ld/testsuite/ld-x86-64/libgot-1b.rd deleted file mode 100644 index 18e432475fc..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1b.rd +++ /dev/null @@ -1,119 +0,0 @@ -ELF Header: - Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 - Class: ELF64 - Data: 2's complement, little endian - Version: 1 \(current\) - OS/ABI: UNIX - System V - ABI Version: 0 - Type: DYN \(Shared object file\) - Machine: Advanced Micro Devices X86-64 - Version: 0x1 - Entry point address: 0x0 - Start of program headers: 64 \(bytes into file\) - Start of section headers: 1160 \(bytes into file\) - Flags: 0x0 - Size of this header: 64 \(bytes\) - Size of program headers: 56 \(bytes\) - Number of program headers: 4 - Size of section headers: 64 \(bytes\) - Number of section headers: 14 - Section header string table index: 13 - -Section Headers: - \[Nr\] Name Type Address Off Size ES Flg Lk Inf Al - \[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0 - \[ 1\] .hash HASH 0000000000000120 000120 000024 04 A 2 0 8 - \[ 2\] .dynsym DYNSYM 0000000000000148 000148 000060 18 A 3 1 8 - \[ 3\] .dynstr STRTAB 00000000000001a8 0001a8 00000e 00 A 0 0 1 - \[ 4\] .rela.dyn RELA 00000000000001b8 0001b8 000018 18 A 2 0 8 - \[ 5\] .rela.plt RELA 00000000000001d0 0001d0 000018 18 AI 2 10 8 - \[ 6\] .plt PROGBITS 00000000000001f0 0001f0 000020 10 AX 0 0 16 - \[ 7\] .text PROGBITS 0000000000000210 000210 00000b 00 AX 0 0 1 - \[ 8\] .dynamic DYNAMIC 0000000000200220 000220 000120 10 WA 3 0 8 - \[ 9\] .got PROGBITS 0000000000200340 000340 000008 08 WA 0 0 8 - \[10\] .got.plt PROGBITS 0000000000200348 000348 000020 08 WA 0 0 8 - \[11\] .symtab SYMTAB 0000000000000000 000368 000090 18 12 3 8 - \[12\] .strtab STRTAB 0000000000000000 0003f8 00002d 00 0 0 1 - \[13\] .shstrtab STRTAB 0000000000000000 000425 000062 00 0 0 1 -Key to Flags: - W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), I \(info\), - L \(link order\), O \(extra OS processing required\), G \(group\), T \(TLS\), - C \(compressed\), x \(unknown\), o \(OS specific\), E \(exclude\), - D \(mbind\), l \(large\), p \(processor specific\) - -There are no section groups in this file. - -Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x00021b 0x00021b R E 0x200000 - LOAD 0x000220 0x0000000000200220 0x0000000000200220 0x000148 0x000148 RW 0x200000 - DYNAMIC 0x000220 0x0000000000200220 0x0000000000200220 0x000120 0x000120 RW 0x8 - GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 - - Section to Segment mapping: - Segment Sections... - 00 .hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text - 01 .dynamic .got .got.plt - 02 .dynamic - 03 - -Dynamic section at offset 0x220 contains 13 entries: - Tag Type Name/Value - 0x0000000000000004 \(HASH\) 0x120 - 0x0000000000000005 \(STRTAB\) 0x1a8 - 0x0000000000000006 \(SYMTAB\) 0x148 - 0x000000000000000a \(STRSZ\) 14 \(bytes\) - 0x000000000000000b \(SYMENT\) 24 \(bytes\) - 0x0000000000000003 \(PLTGOT\) 0x200348 - 0x0000000000000002 \(PLTRELSZ\) 24 \(bytes\) - 0x0000000000000014 \(PLTREL\) RELA - 0x0000000000000017 \(JMPREL\) 0x1d0 - 0x0000000000000007 \(RELA\) 0x1b8 - 0x0000000000000008 \(RELASZ\) 24 \(bytes\) - 0x0000000000000009 \(RELAENT\) 24 \(bytes\) - 0x0000000000000000 \(NULL\) 0x0 - -Relocation section '.rela.dyn' at offset 0x1b8 contains 1 entry: - Offset Info Type Symbol's Value Symbol's Name \+ Addend -0+200340 0000000200000006 R_X86_64_GLOB_DAT 0000000000000000 foo \+ 0 - -Relocation section '.rela.plt' at offset 0x1d0 contains 1 entry: - Offset Info Type Symbol's Value Symbol's Name \+ Addend -0+200360 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 bar \+ 0 -No processor specific unwind information to decode - -Symbol table '.dynsym' contains 4 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 0000000000000210 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Symbol table '.symtab' contains 6 entries: - Num: Value Size Type Bind Vis Ndx Name - +[a-f0-9]+: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND - +[a-f0-9]+: 0000000000200220 0 OBJECT LOCAL DEFAULT 8 _DYNAMIC - +[a-f0-9]+: 0000000000200348 0 OBJECT LOCAL DEFAULT 10 _GLOBAL_OFFSET_TABLE_ - +[a-f0-9]+: 0000000000000210 0 FUNC GLOBAL DEFAULT 7 func - +[a-f0-9]+: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo - +[a-f0-9]+: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar - -Histogram for bucket list length \(total of 3 buckets\): - Length Number % of total Coverage - 0 1 \( 33.3%\) - 1 1 \( 33.3%\) 33.3% - 2 1 \( 33.3%\) 100.0% - -No version information found in this file. - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 0000000000200340 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 0000000000200348 200220 - +[0-9]+: 0000000000200350 0 - +[0-9]+: 0000000000200358 0 - +[0-9]+: 0000000000200360 R_X86_64_JUMP_SLOT bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1c-x32.rd b/ld/testsuite/ld-x86-64/libgot-1c-x32.rd deleted file mode 100644 index a3bdacf1fa4..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1c-x32.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200208 20016c - +[0-9]+: 00200210 0 - +[0-9]+: 00200218 0 - +[0-9]+: 00200220 R_X86_64_JUMP_SLO bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1c.rd b/ld/testsuite/ld-x86-64/libgot-1c.rd deleted file mode 100644 index fc1a2605848..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1c.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 000000200340 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 000000200348 200220 - +[0-9]+: 000000200350 0 - +[0-9]+: 000000200358 0 - +[0-9]+: 000000200360 R_X86_64_JUMP_SLO bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1d-x32.rd b/ld/testsuite/ld-x86-64/libgot-1d-x32.rd deleted file mode 100644 index 3e2693e0f52..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1d-x32.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200200 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 00200208 20016c - +[0-9]+: 00200210 0 - +[0-9]+: 00200218 0 - +[0-9]+: 00200220 R_X86_64_JUMP_SLOT bar \+ 0 -#pass diff --git a/ld/testsuite/ld-x86-64/libgot-1d.rd b/ld/testsuite/ld-x86-64/libgot-1d.rd deleted file mode 100644 index 341840e9081..00000000000 --- a/ld/testsuite/ld-x86-64/libgot-1d.rd +++ /dev/null @@ -1,12 +0,0 @@ - -Global Offset Table '.got' contains 1 entry: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 0000000000200340 R_X86_64_GLOB_DAT foo \+ 0 - -Global Offset Table '.got.plt' contains 4 entries: - Index: Address Reloc Sym. Name \+ Addend/Value - +[0-9]+: 0000000000200348 200220 - +[0-9]+: 0000000000200350 0 - +[0-9]+: 0000000000200358 0 - +[0-9]+: 0000000000200360 R_X86_64_JUMP_SLOT bar \+ 0 -#pass