diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-06-20 13:18:52 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2011-06-20 13:18:52 +0000 |
commit | e41b3a13792f24506443962d82207466bf9b9e39 (patch) | |
tree | 583e921340ccca5bb5bf50e7833d2e579f575b80 /ld/testsuite/ld-i386 | |
parent | b47d265edba0a7f45ffd3a9952806e124364368b (diff) | |
download | gdb-e41b3a13792f24506443962d82207466bf9b9e39.zip gdb-e41b3a13792f24506443962d82207466bf9b9e39.tar.gz gdb-e41b3a13792f24506443962d82207466bf9b9e39.tar.bz2 |
PR ld/12570
include/
* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
option.
ld/
* emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO,
OPTION_NO_LD_GENERATED_UNWIND_INFO): Define.
(gld${EMULATION_NAME}_handle_option): Handle
--ld-generated-unwind-info and --no-ld-generated-unwind-info.
* ld.texinfo (--ld-generated-unwind-info,
--no-ld-generated-unwind-info): Document.
bfd/
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
at all for linker created .eh_frame sections.
(_bfd_elf_discard_section_eh_frame): Handle linker created
.eh_frame sections with no relocations.
* elf64-x86-64.c: Include dwarf2.h.
(elf_x86_64_eh_frame_plt): New variable.
(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
PLT_FDE_LEN_OFFSET): Define.
(struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
(elf_x86_64_create_dynamic_sections): Create and fill in
.eh_frame section for .plt section.
(elf_x86_64_size_dynamic_sections): Write .plt section size
into .eh_frame FDE covering .plt section.
(elf_x86_64_finish_dynamic_sections): Write .plt section
start into .eh_frame FDE covering .plt section. Call
_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
(elf_backend_plt_alignment): Define to 4.
* elf32-i386.c: Include dwarf2.h.
(elf_i386_eh_frame_plt): New variable.
(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
PLT_FDE_LEN_OFFSET): Define.
(struct elf_i386_link_hash_table): Add plt_eh_frame field.
(elf_i386_create_dynamic_sections): Create and fill in
.eh_frame section for .plt section.
(elf_i386_size_dynamic_sections): Write .plt section size
into .eh_frame FDE covering .plt section.
(elf_i386_finish_dynamic_sections): Write .plt section
start into .eh_frame FDE covering .plt section. Call
_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
(elf_backend_plt_alignment): Define to 4.
ld/testsuite/
* ld-x86-64/x86-64.exp: Link some testcases with
--no-ld-generated-unwind-info.
* ld-x86-64/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
comment.
* ld-x86-64/tlsdesc.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlsdesc.sd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
* ld-x86-64/tlsbindesc.rd: Likewise.
* ld-x86-64/tlsbindesc.sd: Likewise.
* ld-x86-64/tlsbin.td: Likewise.
* ld-x86-64/tlsdesc.pd: Likewise.
* ld-x86-64/tlsdesc.td: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsgdesc.rd: Likewise.
* ld-x86-64/tlspic.sd: Likewise.
* ld-x86-64/tlsbindesc.td: Likewise.
* ld-x86-64/tlspic.td: Likewise.
* ld-x86-64/tlsbin.sd: Likewise.
* ld-x86-64/ilp32-4.d: Likewise.
* ld-x86-64/tlsgdesc.dd: Add --no-ld-generated-unwind-info to ld
comment. Adjust.
* ld-x86-64/tlsdesc.rd: Likewise.
* ld-x86-64/tlsgd6.dd: Adjust.
* ld-x86-64/tlsgd5.dd: Likewise.
* ld-i386/i386.exp: Link some testcases with
--no-ld-generated-unwind-info.
* ld-i386/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
comment..
* ld-i386/tlsdesc.dd: Likewise.
* ld-i386/tlspic.dd: Likewise.
* ld-i386/tlsdesc.sd: Likewise.
* ld-i386/tlsgdesc.dd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-i386/tlspic.rd: Likewise.
* ld-i386/tlsdesc.rd: Likewise.
* ld-i386/tlsbindesc.rd: Likewise.
* ld-i386/tlsbindesc.sd: Likewise.
* ld-i386/tlsbin.td: Likewise.
* ld-i386/tlsdesc.td: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsbindesc.dd: Likewise.
* ld-i386/tlsbin.dd: Likewise.
* ld-i386/tlsgdesc.rd: Likewise.
* ld-i386/tlspic.sd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlsbindesc.td: Likewise.
* ld-i386/tlspic.td: Likewise.
* ld-i386/tlsbin.sd: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.sd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.td | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbindesc.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbindesc.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbindesc.sd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbindesc.td | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsdesc.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsdesc.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsdesc.sd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsdesc.td | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsgdesc.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsgdesc.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsnopic.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsnopic.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsnopic.sd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspic.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspic.rd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspic.sd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspic.td | 2 |
22 files changed, 32 insertions, 27 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 3bce2d3..ae798c0 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -118,12 +118,14 @@ if { !([istarget "i?86-*-elf*"] # readelf: Apply readelf options on result. Compare with regex (last arg). set i386tests { - {"TLS -fpic -shared transitions" "-shared -melf_i386" + {"TLS -fpic -shared transitions" + "-shared -melf_i386 --no-ld-generated-unwind-info" "--32" {tlspic1.s tlspic2.s} {{readelf -Ssrl tlspic.rd} {objdump -drj.text tlspic.dd} {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}} "libtlspic.so"} - {"TLS descriptor -fpic -shared transitions" "-shared -melf_i386" + {"TLS descriptor -fpic -shared transitions" + "-shared -melf_i386 --no-ld-generated-unwind-info" "--32" {tlsdesc.s tlspic2.s} {{readelf -Ssrl tlsdesc.rd} {objdump -drj.text tlsdesc.dd} {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}} @@ -131,21 +133,24 @@ set i386tests { {"Helper shared library" "-shared -melf_i386" "--32" {tlslib.s} {} "libtlslib.so"} {"TLS -fpic and -fno-pic exec transitions" - "-melf_i386 tmpdir/libtlslib.so" "--32" {tlsbinpic.s tlsbin.s} + "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info" + "--32" {tlsbinpic.s tlsbin.s} {{readelf -Ssrl tlsbin.rd} {objdump -drj.text tlsbin.dd} {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}} "tlsbin"} {"TLS descriptor -fpic and -fno-pic exec transitions" - "-melf_i386 tmpdir/libtlslib.so" "--32" {tlsbindesc.s tlsbin.s} + "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info" + "--32" {tlsbindesc.s tlsbin.s} {{readelf -Ssrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd} {objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}} "tlsbindesc"} - {"TLS -fno-pic -shared" "-shared -melf_i386" + {"TLS -fno-pic -shared" "-shared -melf_i386 --no-ld-generated-unwind-info" "--32" {tlsnopic1.s tlsnopic2.s} {{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd} {objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"} {"TLS with global dynamic and descriptors" - "-shared -melf_i386" "--32" {tlsgdesc.s} + "-shared -melf_i386 --no-ld-generated-unwind-info" + "--32" {tlsgdesc.s} {{readelf -Ssrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}} "libtlsgdesc.so"} {"TLS in debug sections" "-melf_i386" diff --git a/ld/testsuite/ld-i386/tlsbin.dd b/ld/testsuite/ld-i386/tlsbin.dd index 9cf14a5..6f6c0e4 100644 --- a/ld/testsuite/ld-i386/tlsbin.dd +++ b/ld/testsuite/ld-i386/tlsbin.dd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbin.rd b/ld/testsuite/ld-i386/tlsbin.rd index 84cec78..5579334 100644 --- a/ld/testsuite/ld-i386/tlsbin.rd +++ b/ld/testsuite/ld-i386/tlsbin.rd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbin.sd b/ld/testsuite/ld-i386/tlsbin.sd index 2fa7a89..99dc4c5 100644 --- a/ld/testsuite/ld-i386/tlsbin.sd +++ b/ld/testsuite/ld-i386/tlsbin.sd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -sj.got #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbin.td b/ld/testsuite/ld-i386/tlsbin.td index bb29455..a1ed433 100644 --- a/ld/testsuite/ld-i386/tlsbin.td +++ b/ld/testsuite/ld-i386/tlsbin.td @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -sj.tdata #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbindesc.dd b/ld/testsuite/ld-i386/tlsbindesc.dd index f77d1c8..db54764 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.dd +++ b/ld/testsuite/ld-i386/tlsbindesc.dd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbindesc.rd b/ld/testsuite/ld-i386/tlsbindesc.rd index c2cea19..a334e56 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.rd +++ b/ld/testsuite/ld-i386/tlsbindesc.rd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbindesc.sd b/ld/testsuite/ld-i386/tlsbindesc.sd index a87f5da..7d56466 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.sd +++ b/ld/testsuite/ld-i386/tlsbindesc.sd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -sj.got #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsbindesc.td b/ld/testsuite/ld-i386/tlsbindesc.td index 726df3e..64859dd 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.td +++ b/ld/testsuite/ld-i386/tlsbindesc.td @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --32 -#ld: -melf_i386 tmpdir/libtlslib.so +#ld: -melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info #objdump: -sj.tdata #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsdesc.dd b/ld/testsuite/ld-i386/tlsdesc.dd index bca0090..85db8dd 100644 --- a/ld/testsuite/ld-i386/tlsdesc.dd +++ b/ld/testsuite/ld-i386/tlsdesc.dd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsdesc.rd b/ld/testsuite/ld-i386/tlsdesc.rd index 42edd44..c7c41c6 100644 --- a/ld/testsuite/ld-i386/tlsdesc.rd +++ b/ld/testsuite/ld-i386/tlsdesc.rd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsdesc.sd b/ld/testsuite/ld-i386/tlsdesc.sd index 656c409..ad3d1e3 100644 --- a/ld/testsuite/ld-i386/tlsdesc.sd +++ b/ld/testsuite/ld-i386/tlsdesc.sd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -s -j.got -j.got.plt #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsdesc.td b/ld/testsuite/ld-i386/tlsdesc.td index f3612b3..12cc43c 100644 --- a/ld/testsuite/ld-i386/tlsdesc.td +++ b/ld/testsuite/ld-i386/tlsdesc.td @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsgdesc.dd b/ld/testsuite/ld-i386/tlsgdesc.dd index 25659de..92062ce 100644 --- a/ld/testsuite/ld-i386/tlsgdesc.dd +++ b/ld/testsuite/ld-i386/tlsgdesc.dd @@ -1,6 +1,6 @@ #source: tlsgdesc.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsgdesc.rd b/ld/testsuite/ld-i386/tlsgdesc.rd index 3a224a2..fa0eeb9 100644 --- a/ld/testsuite/ld-i386/tlsgdesc.rd +++ b/ld/testsuite/ld-i386/tlsgdesc.rd @@ -1,6 +1,6 @@ #source: tlsgdesc.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsnopic.dd b/ld/testsuite/ld-i386/tlsnopic.dd index a0a8853..995cdaa 100644 --- a/ld/testsuite/ld-i386/tlsnopic.dd +++ b/ld/testsuite/ld-i386/tlsnopic.dd @@ -1,7 +1,7 @@ #source: tlsnopic1.s #source: tlsnopic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsnopic.rd b/ld/testsuite/ld-i386/tlsnopic.rd index 2590a9f..2396fc5 100644 --- a/ld/testsuite/ld-i386/tlsnopic.rd +++ b/ld/testsuite/ld-i386/tlsnopic.rd @@ -1,7 +1,7 @@ #source: tlsnopic1.s #source: tlsnopic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlsnopic.sd b/ld/testsuite/ld-i386/tlsnopic.sd index fdfaacf..925c5d5 100644 --- a/ld/testsuite/ld-i386/tlsnopic.sd +++ b/ld/testsuite/ld-i386/tlsnopic.sd @@ -1,7 +1,7 @@ #source: tlsnopic1.s #source: tlsnopic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -sj.got #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlspic.dd b/ld/testsuite/ld-i386/tlspic.dd index dd436d2..b0c046d 100644 --- a/ld/testsuite/ld-i386/tlspic.dd +++ b/ld/testsuite/ld-i386/tlspic.dd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -drj.text #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlspic.rd b/ld/testsuite/ld-i386/tlspic.rd index 46b8ed5..7fe042e 100644 --- a/ld/testsuite/ld-i386/tlspic.rd +++ b/ld/testsuite/ld-i386/tlspic.rd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #readelf: -Ssrl #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlspic.sd b/ld/testsuite/ld-i386/tlspic.sd index f9c9627..15b3b93 100644 --- a/ld/testsuite/ld-i386/tlspic.sd +++ b/ld/testsuite/ld-i386/tlspic.sd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -sj.got #target: i?86-*-* diff --git a/ld/testsuite/ld-i386/tlspic.td b/ld/testsuite/ld-i386/tlspic.td index 1291584..a96d6f6 100644 --- a/ld/testsuite/ld-i386/tlspic.td +++ b/ld/testsuite/ld-i386/tlspic.td @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --32 -#ld: -shared -melf_i386 +#ld: -shared -melf_i386 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: i?86-*-* |