aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-10-17 13:41:49 +0000
committerAlan Modra <amodra@gmail.com>2006-10-17 13:41:49 +0000
commit74541ad4c01323646d5bebe7ff10828f84af0f49 (patch)
tree290813ab87157e643bf32d7271cecb1dc394179d /ld/testsuite/ld-i386
parent21643204152d14c5e9c32a56ef6dfd1b4067cf28 (diff)
downloadfsf-binutils-gdb-74541ad4c01323646d5bebe7ff10828f84af0f49.zip
fsf-binutils-gdb-74541ad4c01323646d5bebe7ff10828f84af0f49.tar.gz
fsf-binutils-gdb-74541ad4c01323646d5bebe7ff10828f84af0f49.tar.bz2
bfd/
* elf-bfd.h (struct elf_link_hash_table): Reorder. Add text_index_section and data_index_section. (struct elf_backend_data): Add elf_backend_init_index_section. (_bfd_elf_init_1_index_section): Declare. (_bfd_elf_init_2_index_sections): Declare. * elfxx-target.h (elf_backend_init_index_section): Define. (elfNN_bed): Init new field. * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls section and text_index_section plus data_index_section. (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections. (_bfd_elf_init_1_index_section): New function. (_bfd_elf_init_2_index_sections): New function. (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section. (elf_link_input_bfd): When emitting relocs, use text_index_section and data_index_section for removed sections. * elf-m10300.c (elf_backend_omit_section_dynsym): Define. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-sh.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section and data_index_section sym for relocs against sections with no dynamic section sym. (elf_backend_init_index_section): Define. * elf32-cris.c: Similarly. * elf32-hppa.c: Similarly. * elf32-i370.c: Similarly. * elf32-m68k.c: Similarly. * elf32-mips.c: Similarly. * elf32-ppc.c: Similarly. * elf32-s390.c: Similarly. * elf32-sparc.c: Similarly. * elf32-vax.c: Similarly. * elf64-mips.c: Similarly. * elf64-ppc.c: Similarly. * elf64-s390.c: Similarly. * elf64-sparc.c: Similarly. * elf64-x86-64.c: Similarly. * elfn32-mips.c: Similarly. * elfxx-mips.c: Similarly. * elfxx-sparc.c: Similarly. * linker.c (fix_syms): Base symbols in removed sections on previous section in preference to using absolute section. ld/ * ldlang.c (strip_excluded_output_sections): Do strip sections that define syms, but don't ignore them. * ld.texinfo (Output Section Discarding): Revise. * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call finish_default. ld/testsuite/ Update for section sym changes.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r--ld/testsuite/ld-i386/tlsbin.rd2
-rw-r--r--ld/testsuite/ld-i386/tlsbindesc.rd2
-rw-r--r--ld/testsuite/ld-i386/tlsdesc.rd55
-rw-r--r--ld/testsuite/ld-i386/tlsdesc.sd2
-rw-r--r--ld/testsuite/ld-i386/tlsgdesc.rd25
-rw-r--r--ld/testsuite/ld-i386/tlsnopic.rd4
-rw-r--r--ld/testsuite/ld-i386/tlspic.rd5
7 files changed, 43 insertions, 52 deletions
diff --git a/ld/testsuite/ld-i386/tlsbin.rd b/ld/testsuite/ld-i386/tlsbin.rd
index bd2edd1..54abd8b 100644
--- a/ld/testsuite/ld-i386/tlsbin.rd
+++ b/ld/testsuite/ld-i386/tlsbin.rd
@@ -70,7 +70,7 @@ Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset +Info +Type +Sym.Value Sym. Name
[0-9a-f ]+R_386_JUMP_SLOT +[0-9a-f]+ +___tls_get_addr
-Symbol table '.dynsym' contains 13 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+ +0 TLS +GLOBAL DEFAULT UND sG3
diff --git a/ld/testsuite/ld-i386/tlsbindesc.rd b/ld/testsuite/ld-i386/tlsbindesc.rd
index 9e2148e..65b47a2 100644
--- a/ld/testsuite/ld-i386/tlsbindesc.rd
+++ b/ld/testsuite/ld-i386/tlsbindesc.rd
@@ -64,7 +64,7 @@ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
0+804a0fc 00000825 R_386_TLS_TPOFF32 0+ +sG1
0+804a100 00000b0e R_386_TLS_TPOFF +0+ +sG8
-Symbol table '.dynsym' contains 12 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+ +0 TLS +GLOBAL DEFAULT UND sG3
diff --git a/ld/testsuite/ld-i386/tlsdesc.rd b/ld/testsuite/ld-i386/tlsdesc.rd
index 1d4a6c2..aca162c 100644
--- a/ld/testsuite/ld-i386/tlsdesc.rd
+++ b/ld/testsuite/ld-i386/tlsdesc.rd
@@ -49,41 +49,38 @@ Program Headers:
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
Offset +Info +Type +Sym.Value +Sym. Name
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+0e R_386_TLS_TPOFF *
-[0-9a-f]+ +0+25 R_386_TLS_TPOFF32
-[0-9a-f]+ +0+50e R_386_TLS_TPOFF 0+8 sg3
-[0-9a-f]+ +0+625 R_386_TLS_TPOFF32 0+c sg4
-[0-9a-f]+ +0+60e R_386_TLS_TPOFF 0+c sg4
-[0-9a-f]+ +0+70e R_386_TLS_TPOFF 0+10 sg5
-[0-9a-f]+ +0+b25 R_386_TLS_TPOFF32 0+4 sg2
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF 0+8 sg3
+[0-9a-f ]+R_386_TLS_TPOFF32 0+c sg4
+[0-9a-f ]+R_386_TLS_TPOFF 0+c sg4
+[0-9a-f ]+R_386_TLS_TPOFF 0+10 sg5
+[0-9a-f ]+R_386_TLS_TPOFF32 0+4 sg2
Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 5 entries:
Offset Info Type Sym.Value Sym. Name
-[0-9a-f]+ +0+829 R_386_TLS_DESC * 0+ sg1
-[0-9a-f]+ +0+29 R_386_TLS_DESC *
-[0-9a-f]+ +0+29 R_386_TLS_DESC *
-[0-9a-f]+ +0+29 R_386_TLS_DESC *
-[0-9a-f]+ +0+29 R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC * 0+ sg1
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
-Symbol table '.dynsym' contains 16 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 +6 *
- +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +7 *
- +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +8 *
+[0-9]+: 0+1c +0 TLS +GLOBAL DEFAULT +7 sg8
+[0-9]+: 0+8 +0 TLS +GLOBAL DEFAULT +7 sg3
+[0-9]+: 0+c +0 TLS +GLOBAL DEFAULT +7 sg4
diff --git a/ld/testsuite/ld-i386/tlsdesc.sd b/ld/testsuite/ld-i386/tlsdesc.sd
index 2af8c2d..656c409 100644
--- a/ld/testsuite/ld-i386/tlsdesc.sd
+++ b/ld/testsuite/ld-i386/tlsdesc.sd
@@ -14,7 +14,7 @@ Contents of section \.got:
[0-9a-f]+ 6c000000 b4ffffff 4c000000 68000000 .*
[0-9a-f]+ 50000000 70000000 00000000 bcffffff .*
Contents of section \.got\.plt:
- [0-9a-f]+ ec150000 00000000 00000000 00000000 .*
+ [0-9a-f]+ b0150000 00000000 00000000 00000000 .*
[0-9a-f]+ 20000000 00000000 60000000 00000000 .*
[0-9a-f]+ 00000000 00000000 00000000 00000000 .*
[0-9a-f]+ 40000000 +.*
diff --git a/ld/testsuite/ld-i386/tlsgdesc.rd b/ld/testsuite/ld-i386/tlsgdesc.rd
index 08c30bc..0c5c425 100644
--- a/ld/testsuite/ld-i386/tlsgdesc.rd
+++ b/ld/testsuite/ld-i386/tlsgdesc.rd
@@ -45,25 +45,24 @@ Program Headers:
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
Offset +Info +Type +Sym.Value +Sym. Name
-[0-9a-f]+ +0+225 R_386_TLS_TPOFF32 0+ sG3
-[0-9a-f]+ +0+30e R_386_TLS_TPOFF 0+ sG5
-[0-9a-f]+ +0+423 R_386_TLS_DTPMOD3 0+ sG2
-[0-9a-f]+ +0+424 R_386_TLS_DTPOFF3 0+ sG2
-[0-9a-f]+ +0+50e R_386_TLS_TPOFF 0+ sG4
-[0-9a-f]+ +0+725 R_386_TLS_TPOFF32 0+ sG6
-[0-9a-f]+ +0+923 R_386_TLS_DTPMOD3 0+ sG1
-[0-9a-f]+ +0+924 R_386_TLS_DTPOFF3 0+ sG1
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ sG3
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sG5
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ sG2
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ sG2
+[0-9a-f ]+R_386_TLS_TPOFF 0+ sG4
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ sG6
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ sG1
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ sG1
Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 3 entries:
Offset Info Type Sym.Value Sym. Name
-[0-9a-f]+ 0+c07 R_386_JUMP_SLOT 0+ ___tls_get_addr
-[0-9a-f]+ 0+929 R_386_TLS_DESC 0+ sG1
-[0-9a-f]+ 0+429 R_386_TLS_DESC 0+ sG2
+[0-9a-f ]+R_386_JUMP_SLOT 0+ ___tls_get_addr
+[0-9a-f ]+R_386_TLS_DESC 0+ sG1
+[0-9a-f ]+R_386_TLS_DESC 0+ sG2
-Symbol table '.dynsym' contains 13 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+ +0 TLS +GLOBAL DEFAULT UND sG3
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG5
+[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT UND sG2
diff --git a/ld/testsuite/ld-i386/tlsnopic.rd b/ld/testsuite/ld-i386/tlsnopic.rd
index 17bd770..6ba628b 100644
--- a/ld/testsuite/ld-i386/tlsnopic.rd
+++ b/ld/testsuite/ld-i386/tlsnopic.rd
@@ -69,11 +69,9 @@ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
[0-9a-f ]+R_386_TLS_TPOFF 0+ sg2
-Symbol table '.dynsym' contains 12 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 +5 *
- +[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 sg4
+[0-9]+: 0+1000 +0 FUNC +GLOBAL DEFAULT +5 fn3
diff --git a/ld/testsuite/ld-i386/tlspic.rd b/ld/testsuite/ld-i386/tlspic.rd
index 5109bce..c902cf3 100644
--- a/ld/testsuite/ld-i386/tlspic.rd
+++ b/ld/testsuite/ld-i386/tlspic.rd
@@ -81,12 +81,9 @@ Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
Offset +Info +Type +Sym.Value +Sym. Name
[0-9a-f ]+R_386_JUMP_SLOT 0+ ___tls_get_addr
-Symbol table '.dynsym' contains 17 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 +8 *
- +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL DEFAULT +9 *
+[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