+2011-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR ld/12570
+ * 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.
+
2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf_backend_post_process_headers): Defined
}
else
{
- asection *rsec;
-
/* Find the corresponding CIE. */
unsigned int cie_offset = this_inf->offset + 4 - hdr_id;
for (cie = local_cies; cie < local_cies + cie_count; cie++)
= cie->cie_inf->add_augmentation_size;
ENSURE_NO_RELOCS (buf);
- REQUIRE (GET_RELOC (buf));
-
- /* Chain together the FDEs for each section. */
- rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
- /* RSEC will be NULL if FDE was cleared out as it was belonging to
- a discarded SHT_GROUP. */
- if (rsec)
+ if ((sec->flags & SEC_LINKER_CREATED) == 0 || cookie->rels != NULL)
{
- REQUIRE (rsec->owner == abfd);
- this_inf->u.fde.next_for_section = elf_fde_list (rsec);
- elf_fde_list (rsec) = this_inf;
+ asection *rsec;
+
+ REQUIRE (GET_RELOC (buf));
+
+ /* Chain together the FDEs for each section. */
+ rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
+ /* RSEC will be NULL if FDE was cleared out as it was belonging to
+ a discarded SHT_GROUP. */
+ if (rsec)
+ {
+ REQUIRE (rsec->owner == abfd);
+ this_inf->u.fde.next_for_section = elf_fde_list (rsec);
+ elf_fde_list (rsec) = this_inf;
+ }
}
/* Skip the initial location and address range. */
if (sec_info == NULL)
return FALSE;
+ ptr_size = (get_elf_backend_data (sec->owner)
+ ->elf_backend_eh_frame_address_size (sec->owner, sec));
+
hdr_info = &elf_hash_table (info)->eh_info;
for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
if (ent->size == 4)
ent->removed = sec->map_head.s != NULL;
else if (!ent->cie)
{
- cookie->rel = cookie->rels + ent->reloc_index;
- /* FIXME: octets_per_byte. */
- BFD_ASSERT (cookie->rel < cookie->relend
- && cookie->rel->r_offset == ent->offset + 8);
- if (!(*reloc_symbol_deleted_p) (ent->offset + 8, cookie))
+ bfd_boolean keep;
+ if ((sec->flags & SEC_LINKER_CREATED) != 0 && cookie->rels == NULL)
+ {
+ unsigned int width
+ = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+ bfd_vma value
+ = read_value (abfd, sec->contents + ent->offset + 8 + width,
+ width, get_DW_EH_PE_signed (ent->fde_encoding));
+ keep = value != 0;
+ }
+ else
+ {
+ cookie->rel = cookie->rels + ent->reloc_index;
+ /* FIXME: octets_per_byte. */
+ BFD_ASSERT (cookie->rel < cookie->relend
+ && cookie->rel->r_offset == ent->offset + 8);
+ keep = !(*reloc_symbol_deleted_p) (ent->offset + 8, cookie);
+ }
+ if (keep)
{
if (info->shared
&& (((ent->fde_encoding & 0x70) == DW_EH_PE_absptr
sec_info->cies = NULL;
}
- ptr_size = (get_elf_backend_data (sec->owner)
- ->elf_backend_eh_frame_address_size (sec->owner, sec));
offset = 0;
for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
if (!ent->removed)
#include "bfd_stdint.h"
#include "objalloc.h"
#include "hashtab.h"
+#include "dwarf2.h"
/* 386 uses REL relocations instead of RELA. */
#define USE_REL 1
0, 0, 0, 0 /* replaced with offset to start of .plt. */
};
+/* .eh_frame covering the .plt section. */
+
+static const bfd_byte elf_i386_eh_frame_plt[] =
+{
+#define PLT_CIE_LENGTH 20
+#define PLT_FDE_LENGTH 36
+#define PLT_FDE_START_OFFSET 4 + PLT_CIE_LENGTH + 8
+#define PLT_FDE_LEN_OFFSET 4 + PLT_CIE_LENGTH + 12
+ PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */
+ 0, 0, 0, 0, /* CIE ID */
+ 1, /* CIE version */
+ 'z', 'R', 0, /* Augmentation string */
+ 1, /* Code alignment factor */
+ 0x7c, /* Data alignment factor */
+ 8, /* Return address column */
+ 1, /* Augmentation size */
+ DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+ DW_CFA_def_cfa, 4, 4, /* DW_CFA_def_cfa: r4 (esp) ofs 4 */
+ DW_CFA_offset + 8, 1, /* DW_CFA_offset: r8 (eip) at cfa-4 */
+ DW_CFA_nop, DW_CFA_nop,
+
+ PLT_FDE_LENGTH, 0, 0, 0, /* FDE length */
+ PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */
+ 0, 0, 0, 0, /* R_386_PC32 .plt goes here */
+ 0, 0, 0, 0, /* .plt size goes here */
+ 0, /* Augmentation size */
+ DW_CFA_def_cfa_offset, 8, /* DW_CFA_def_cfa_offset: 8 */
+ DW_CFA_advance_loc + 6, /* DW_CFA_advance_loc: 6 to __PLT__+6 */
+ DW_CFA_def_cfa_offset, 12, /* DW_CFA_def_cfa_offset: 12 */
+ DW_CFA_advance_loc + 10, /* DW_CFA_advance_loc: 10 to __PLT__+16 */
+ DW_CFA_def_cfa_expression, /* DW_CFA_def_cfa_expression */
+ 11, /* Block length */
+ DW_OP_breg4, 4, /* DW_OP_breg4 (esp): 4 */
+ DW_OP_breg8, 0, /* DW_OP_breg8 (eip): 0 */
+ DW_OP_lit15, DW_OP_and, DW_OP_lit11, DW_OP_ge,
+ DW_OP_lit3, DW_OP_shl, DW_OP_plus,
+ DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
/* On VxWorks, the .rel.plt.unloaded section has absolute relocations
for the PLTResolve stub and then for each PLT entry. */
#define PLTRESOLVE_RELOCS_SHLIB 0
/* Short-cuts to get to dynamic linker sections. */
asection *sdynbss;
asection *srelbss;
+ asection *plt_eh_frame;
union
{
&htab->srelplt2))
return FALSE;
+ if (!info->no_ld_generated_unwind_info
+ && bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
+ && htab->elf.splt != NULL)
+ {
+ flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
+ htab->plt_eh_frame
+ = bfd_make_section_with_flags (dynobj, ".eh_frame",
+ flags | SEC_READONLY);
+ if (htab->plt_eh_frame == NULL
+ || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 2))
+ return FALSE;
+
+ htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
+ htab->plt_eh_frame->contents
+ = bfd_alloc (dynobj, htab->plt_eh_frame->size);
+ memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
+ sizeof (elf_i386_eh_frame_plt));
+ }
+
return TRUE;
}
return FALSE;
}
+ if (htab->plt_eh_frame != NULL
+ && htab->elf.splt != NULL
+ && htab->elf.splt->size != 0
+ && (htab->elf.splt->flags & SEC_EXCLUDE) == 0)
+ bfd_put_32 (dynobj, htab->elf.splt->size,
+ htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
+
if (htab->elf.dynamic_sections_created)
{
/* Add some entries to the .dynamic section. We fill in the
elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = 4;
}
+ /* Adjust .eh_frame for .plt section. */
+ if (htab->plt_eh_frame != NULL)
+ {
+ if (htab->elf.splt != NULL
+ && htab->elf.splt->size != 0
+ && (htab->elf.splt->flags & SEC_EXCLUDE) == 0
+ && htab->elf.splt->output_section != NULL
+ && htab->plt_eh_frame->output_section != NULL)
+ {
+ bfd_vma plt_start = htab->elf.splt->output_section->vma;
+ bfd_vma eh_frame_start = htab->plt_eh_frame->output_section->vma
+ + htab->plt_eh_frame->output_offset
+ + PLT_FDE_START_OFFSET;
+ bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+ htab->plt_eh_frame->contents
+ + PLT_FDE_START_OFFSET);
+ }
+ if (htab->plt_eh_frame->sec_info_type
+ == ELF_INFO_TYPE_EH_FRAME)
+ {
+ if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+ htab->plt_eh_frame,
+ htab->plt_eh_frame->contents))
+ return FALSE;
+ }
+ }
+
if (htab->elf.sgot && htab->elf.sgot->size > 0)
elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
+#define elf_backend_plt_alignment 4
/* Support RELA for objdump of prelink objects. */
#define elf_info_to_howto elf_i386_info_to_howto_rel
#include "bfd_stdint.h"
#include "objalloc.h"
#include "hashtab.h"
+#include "dwarf2.h"
#include "elf/x86-64.h"
0, 0, 0, 0 /* replaced with offset to start of .plt0. */
};
+/* .eh_frame covering the .plt section. */
+
+static const bfd_byte elf_x86_64_eh_frame_plt[] =
+{
+#define PLT_CIE_LENGTH 20
+#define PLT_FDE_LENGTH 36
+#define PLT_FDE_START_OFFSET 4 + PLT_CIE_LENGTH + 8
+#define PLT_FDE_LEN_OFFSET 4 + PLT_CIE_LENGTH + 12
+ PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */
+ 0, 0, 0, 0, /* CIE ID */
+ 1, /* CIE version */
+ 'z', 'R', 0, /* Augmentation string */
+ 1, /* Code alignment factor */
+ 0x78, /* Data alignment factor */
+ 16, /* Return address column */
+ 1, /* Augmentation size */
+ DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
+ DW_CFA_def_cfa, 7, 8, /* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
+ DW_CFA_offset + 16, 1, /* DW_CFA_offset: r16 (rip) at cfa-8 */
+ DW_CFA_nop, DW_CFA_nop,
+
+ PLT_FDE_LENGTH, 0, 0, 0, /* FDE length */
+ PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */
+ 0, 0, 0, 0, /* R_X86_64_PC32 .plt goes here */
+ 0, 0, 0, 0, /* .plt size goes here */
+ 0, /* Augmentation size */
+ DW_CFA_def_cfa_offset, 16, /* DW_CFA_def_cfa_offset: 16 */
+ DW_CFA_advance_loc + 6, /* DW_CFA_advance_loc: 6 to __PLT__+6 */
+ DW_CFA_def_cfa_offset, 24, /* DW_CFA_def_cfa_offset: 24 */
+ DW_CFA_advance_loc + 10, /* DW_CFA_advance_loc: 10 to __PLT__+16 */
+ DW_CFA_def_cfa_expression, /* DW_CFA_def_cfa_expression */
+ 11, /* Block length */
+ DW_OP_breg7, 8, /* DW_OP_breg7 (rsp): 8 */
+ DW_OP_breg16, 0, /* DW_OP_breg16 (rip): 0 */
+ DW_OP_lit15, DW_OP_and, DW_OP_lit11, DW_OP_ge,
+ DW_OP_lit3, DW_OP_shl, DW_OP_plus,
+ DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop
+};
+
/* x86-64 ELF linker hash entry. */
struct elf_x86_64_link_hash_entry
/* Short-cuts to get to dynamic linker sections. */
asection *sdynbss;
asection *srelbss;
+ asection *plt_eh_frame;
union
{
|| (!info->shared && !htab->srelbss))
abort ();
+ if (!info->no_ld_generated_unwind_info
+ && bfd_get_section_by_name (dynobj, ".eh_frame") == NULL
+ && htab->elf.splt != NULL)
+ {
+ flagword flags = get_elf_backend_data (dynobj)->dynamic_sec_flags;
+ htab->plt_eh_frame
+ = bfd_make_section_with_flags (dynobj, ".eh_frame",
+ flags | SEC_READONLY);
+ if (htab->plt_eh_frame == NULL
+ || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 3))
+ return FALSE;
+
+ htab->plt_eh_frame->size = sizeof (elf_x86_64_eh_frame_plt);
+ htab->plt_eh_frame->contents
+ = bfd_alloc (dynobj, htab->plt_eh_frame->size);
+ memcpy (htab->plt_eh_frame->contents, elf_x86_64_eh_frame_plt,
+ sizeof (elf_x86_64_eh_frame_plt));
+ }
return TRUE;
}
return FALSE;
}
+ if (htab->plt_eh_frame != NULL
+ && htab->elf.splt != NULL
+ && htab->elf.splt->size != 0
+ && (htab->elf.splt->flags & SEC_EXCLUDE) == 0)
+ bfd_put_32 (dynobj, htab->elf.splt->size,
+ htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
+
if (htab->elf.dynamic_sections_created)
{
/* Add some entries to the .dynamic section. We fill in the
GOT_ENTRY_SIZE;
}
+ /* Adjust .eh_frame for .plt section. */
+ if (htab->plt_eh_frame != NULL)
+ {
+ if (htab->elf.splt != NULL
+ && htab->elf.splt->size != 0
+ && (htab->elf.splt->flags & SEC_EXCLUDE) == 0
+ && htab->elf.splt->output_section != NULL
+ && htab->plt_eh_frame->output_section != NULL)
+ {
+ bfd_vma plt_start = htab->elf.splt->output_section->vma;
+ bfd_vma eh_frame_start = htab->plt_eh_frame->output_section->vma
+ + htab->plt_eh_frame->output_offset
+ + PLT_FDE_START_OFFSET;
+ bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
+ htab->plt_eh_frame->contents
+ + PLT_FDE_START_OFFSET);
+ }
+ if (htab->plt_eh_frame->sec_info_type
+ == ELF_INFO_TYPE_EH_FRAME)
+ {
+ if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
+ htab->plt_eh_frame,
+ htab->plt_eh_frame->contents))
+ return FALSE;
+ }
+ }
+
if (htab->elf.sgot && htab->elf.sgot->size > 0)
elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize
= GOT_ENTRY_SIZE;
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size (GOT_ENTRY_SIZE*3)
#define elf_backend_rela_normal 1
+#define elf_backend_plt_alignment 4
#define elf_info_to_howto elf_x86_64_info_to_howto
+2011-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR ld/12570
+ * bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
+ option.
+
2011-06-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* demangle.h (DMGL_RET_POSTFIX): Extend the comment.
--dynamic-list command line options. */
unsigned int dynamic: 1;
+ /* FALSE if .eh_frame unwind info should be generated for PLT and other
+ linker created sections, TRUE if it should be omitted. */
+ unsigned int no_ld_generated_unwind_info: 1;
+
/* Non-NULL if .note.gnu.build-id section should be created. */
char *emit_note_gnu_build_id;
+2011-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR ld/12570
+ * 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.
+
2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt: Support x32.
#define OPTION_HASH_STYLE (OPTION_EXCLUDE_LIBS + 1)
#define OPTION_BUILD_ID (OPTION_HASH_STYLE + 1)
#define OPTION_AUDIT (OPTION_BUILD_ID + 1)
+#define OPTION_LD_GENERATED_UNWIND_INFO (OPTION_AUDIT + 1)
+#define OPTION_NO_LD_GENERATED_UNWIND_INFO (OPTION_LD_GENERATED_UNWIND_INFO + 1)
static void
gld${EMULATION_NAME}_add_options
{"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
{"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
+ {"ld-generated-unwind-info", no_argument, NULL,
+ OPTION_LD_GENERATED_UNWIND_INFO},
+ {"no-ld-generated-unwind-info", no_argument, NULL,
+ OPTION_NO_LD_GENERATED_UNWIND_INFO},
{"Bgroup", no_argument, NULL, OPTION_GROUP},
EOF
fi
link_info.eh_frame_hdr = TRUE;
break;
+ case OPTION_LD_GENERATED_UNWIND_INFO:
+ link_info.no_ld_generated_unwind_info = FALSE;
+ break;
+
+ case OPTION_NO_LD_GENERATED_UNWIND_INFO:
+ link_info.no_ld_generated_unwind_info = TRUE;
+ break;
+
case OPTION_GROUP:
link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
/* Groups must be self-contained. */
Request creation of @code{.eh_frame_hdr} section and ELF
@code{PT_GNU_EH_FRAME} segment header.
+@kindex --ld-generated-unwind-info
+@item --no-ld-generated-unwind-info
+Request creation of @code{.eh_frame} unwind info for linker
+generated code sections like PLT. This option is on by default
+if linker generated unwind info is supported.
+
@kindex --enable-new-dtags
@kindex --disable-new-dtags
@item --enable-new-dtags
+2011-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR ld/12570
+ * 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.
+
2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/eh1.d: Skip x32.
# 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}}
{"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"
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#source: tlsgdesc.s
#as: --32
-#ld: -shared -melf_i386
+#ld: -shared -melf_i386 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: i?86-*-*
#source: tlsgdesc.s
#as: --32
-#ld: -shared -melf_i386
+#ld: -shared -melf_i386 --no-ld-generated-unwind-info
#readelf: -Ssrl
#target: i?86-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#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-*-*
#source: start.s
#as: --x32
-#ld: -m elf32_x86_64 -shared
+#ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info
#readelf: -d -S --wide
There are 10 section headers, starting at offset 0x22c:
#source: tlsbinpic.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: x86_64-*-*
#source: tlsbinpic.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#readelf: -WSsrl
#target: x86_64-*-*
#source: tlsbinpic.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.got
#target: x86_64-*-*
#source: tlsbinpic.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.tdata
#target: x86_64-*-*
#source: tlsbindesc.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: x86_64-*-*
#source: tlsbindesc.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#readelf: -WSsrl
#target: x86_64-*-*
#source: tlsbindesc.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.got
#target: x86_64-*-*
#source: tlsbindesc.s
#source: tlsbin.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.tdata
#target: x86_64-*-*
#source: tlsdesc.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: x86_64-*-*
#source: tlsdesc.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.plt
#target: x86_64-*-*
#source: tlsdesc.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#readelf: -WSsrld
#target: x86_64-*-*
+\[[ 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
+ +\[[ 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
#source: tlsdesc.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -s -j.got -j.got.plt
#target: x86_64-*-*
#source: tlsdesc.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.tdata
#target: x86_64-*-*
[a-f0-9]+ <_start>:
[ ]*[a-f0-9]+: 64 48 8b 04 25 00 00 00 00 mov %fs:0x0,%rax
-[ ]*[a-f0-9]+: 48 03 05 00 01 20 00 add 0x200100\(%rip\),%rax # 600368 <_DYNAMIC\+0x100>
+[ ]*[a-f0-9]+: 48 03 05 40 01 20 00 add 0x200140\(%rip\),%rax # 6003a8 <_DYNAMIC\+0x100>
#pass
[a-f0-9]+ <_start>:
[ ]*[a-f0-9]+: 64 8b 04 25 00 00 00 00 mov %fs:0x0,%eax
-[ ]*[a-f0-9]+: 48 03 05 81 00 20 00 add 0x200081\(%rip\),%rax # 60022c <_DYNAMIC\+0x80>
+[ ]*[a-f0-9]+: 48 03 05 c5 00 20 00 add 0x2000c5\(%rip\),%rax # 600270 <_DYNAMIC\+0x80>
#pass
#source: tlsgdesc.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: x86_64-*-*
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 03 0d 5e 02 20 00[ ]+add 0x20025e\(%rip\),%rcx +# 200660 <.*>
+ +[0-9a-f]+: 48 03 0d 5e 02 20 00[ ]+add 0x20025e\(%rip\),%rcx +# 200668 <.*>
# -> R_X86_64_TPOFF64 sG3
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 03 0d 68 02 20 00[ ]+add 0x200268\(%rip\),%rcx +# 200680 <.*>
+ +[0-9a-f]+: 48 03 0d 68 02 20 00[ ]+add 0x200268\(%rip\),%rcx +# 200688 <.*>
# -> R_X86_64_TPOFF64 sG4
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD, gd first
- +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+data32 lea 0x20026c\(%rip\),%rdi +# 200690 <.*>
+ +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+data32 lea 0x20026c\(%rip\),%rdi +# 200698 <.*>
+[0-9a-f]+: 00 *
# -> R_X86_64_DTPMOD64 sG1
+[0-9a-f]+: 66 66 48 e8 9c ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*>
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 8d 05 a1 02 20 00[ ]+lea 0x2002a1\(%rip\),%rax +# 2006d8 <.*>
+ +[0-9a-f]+: 48 8d 05 a1 02 20 00[ ]+lea 0x2002a1\(%rip\),%rax +# 2006e0 <.*>
# -> R_X86_64_TLSDESC sG1
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD, desc first
- +[0-9a-f]+: 48 8d 05 84 02 20 00[ ]+lea 0x200284\(%rip\),%rax +# 2006c8 <.*>
+ +[0-9a-f]+: 48 8d 05 84 02 20 00[ ]+lea 0x200284\(%rip\),%rax +# 2006d0 <.*>
# -> R_X86_64_TLSDESC sG2
+[0-9a-f]+: ff 10[ ]+callq \*\(%rax\)
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+data32 lea 0x20021e\(%rip\),%rdi +# 200670 <.*>
+ +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+data32 lea 0x20021e\(%rip\),%rdi +# 200678 <.*>
+[0-9a-f]+: 00 *
# -> R_X86_64_DTPMOD64 sG2
+[0-9a-f]+: 66 66 48 e8 6e ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*>
# GD -> IE, gd first, after IE use
+[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+[0-9a-f]+: 00 00 *
- +[0-9a-f]+: 48 03 05 f2 01 20 00[ ]+add 0x2001f2\(%rip\),%rax +# 200660 <.*>
+ +[0-9a-f]+: 48 03 05 f2 01 20 00[ ]+add 0x2001f2\(%rip\),%rax +# 200668 <.*>
# -> R_X86_64_TPOFF64 sG3
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 8b 05 e7 01 20 00[ ]+mov 0x2001e7\(%rip\),%rax +# 200660 <.*>
+ +[0-9a-f]+: 48 8b 05 e7 01 20 00[ ]+mov 0x2001e7\(%rip\),%rax +# 200668 <.*>
# -> R_X86_64_TPOFF64 sG3
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE, desc first, after IE use
- +[0-9a-f]+: 48 8b 05 fa 01 20 00[ ]+mov 0x2001fa\(%rip\),%rax +# 200680 <.*>
+ +[0-9a-f]+: 48 8b 05 fa 01 20 00[ ]+mov 0x2001fa\(%rip\),%rax +# 200688 <.*>
# -> R_X86_64_TPOFF64 sG4
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+[0-9a-f]+: 00 00 *
- +[0-9a-f]+: 48 03 05 e4 01 20 00[ ]+add 0x2001e4\(%rip\),%rax +# 200680 <.*>
+ +[0-9a-f]+: 48 03 05 e4 01 20 00[ ]+add 0x2001e4\(%rip\),%rax +# 200688 <.*>
# -> R_X86_64_TPOFF64 sG4
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE, gd first, before IE use
+[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+[0-9a-f]+: 00 00 *
- +[0-9a-f]+: 48 03 05 b8 01 20 00[ ]+add 0x2001b8\(%rip\),%rax +# 200668 <.*>
+ +[0-9a-f]+: 48 03 05 b8 01 20 00[ ]+add 0x2001b8\(%rip\),%rax +# 200670 <.*>
# -> R_X86_64_TPOFF64 sG5
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 8b 05 ad 01 20 00[ ]+mov 0x2001ad\(%rip\),%rax +# 200668 <.*>
+ +[0-9a-f]+: 48 8b 05 ad 01 20 00[ ]+mov 0x2001ad\(%rip\),%rax +# 200670 <.*>
# -> R_X86_64_TPOFF64 sG5
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
# GD -> IE, desc first, before IE use
- +[0-9a-f]+: 48 8b 05 c0 01 20 00[ ]+mov 0x2001c0\(%rip\),%rax +# 200688 <.*>
+ +[0-9a-f]+: 48 8b 05 c0 01 20 00[ ]+mov 0x2001c0\(%rip\),%rax +# 200690 <.*>
# -> R_X86_64_TPOFF64 sG6
+[0-9a-f]+: 66 90[ ]+xchg %ax,%ax
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
+[0-9a-f]+: 00 00 *
- +[0-9a-f]+: 48 03 05 aa 01 20 00[ ]+add 0x2001aa\(%rip\),%rax +# 200688 <.*>
+ +[0-9a-f]+: 48 03 05 aa 01 20 00[ ]+add 0x2001aa\(%rip\),%rax +# 200690 <.*>
# -> R_X86_64_TPOFF64 sG6
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 03 0d 74 01 20 00[ ]+add 0x200174\(%rip\),%rcx +# 200668 <.*>
+ +[0-9a-f]+: 48 03 0d 74 01 20 00[ ]+add 0x200174\(%rip\),%rcx +# 200670 <.*>
# -> R_X86_64_TPOFF64 sG5
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 00 00 *
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
- +[0-9a-f]+: 48 03 0d 7e 01 20 00[ ]+add 0x20017e\(%rip\),%rcx +# 200688 <.*>
+ +[0-9a-f]+: 48 03 0d 7e 01 20 00[ ]+add 0x20017e\(%rip\),%rcx +# 200690 <.*>
# -> R_X86_64_TPOFF64 sG6
+[0-9a-f]+: 90[ ]+nop *
+[0-9a-f]+: 90[ ]+nop *
#source: tlsgdesc.s
#as: --64
-#ld: -shared -melf64_x86_64
+#ld: -shared -melf64_x86_64 --no-ld-generated-unwind-info
#readelf: -WSsrl
#target: x86_64-*-*
#source: tlspic1.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -drj.text
#target: x86_64-*-*
#source: tlspic1.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#readelf: -WSsrl
#target: x86_64-*-*
#source: tlspic1.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.got
#target: x86_64-*-*
#source: tlspic1.s
#source: tlspic2.s
#as: --64
-#ld: -shared -melf_x86_64
+#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
#objdump: -sj.tdata
#target: x86_64-*-*
# readelf: Apply readelf options on result. Compare with regex (last arg).
set x86_64tests {
- {"TLS -fpic -shared transitions" "-shared -melf_x86_64"
+ {"TLS -fpic -shared transitions"
+ "-shared -melf_x86_64 --no-ld-generated-unwind-info"
"--64" {tlspic1.s tlspic2.s}
{{readelf -WSsrl 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_x86_64"
+ {"TLS descriptor -fpic -shared transitions"
+ "-shared -melf_x86_64 --no-ld-generated-unwind-info"
"--64" {tlsdesc.s tlspic2.s}
{{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd}
{objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}
{"Helper shared library" "-shared -melf_x86_64"
"--64" {tlslib.s} {} "libtlslib.so"}
{"TLS -fpic and -fno-pic exec transitions"
- "-melf_x86_64 tmpdir/libtlslib.so" "--64" {tlsbinpic.s tlsbin.s}
+ "-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info"
+ "--64" {tlsbinpic.s tlsbin.s}
{{readelf -WSsrl 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_x86_64 tmpdir/libtlslib.so" "--64" {tlsbindesc.s tlsbin.s}
+ "-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info"
+ "--64" {tlsbindesc.s tlsbin.s}
{{readelf -WSsrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd}
{objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}}
"tlsbindesc"}
{"TLS with global dynamic and descriptors"
- "-shared -melf_x86_64" "--64" {tlsgdesc.s}
+ "-shared -melf_x86_64 --no-ld-generated-unwind-info"
+ "--64" {tlsgdesc.s}
{{readelf -WSsrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}}
"libtlsgdesc.so"}
{"TLS in debug sections" "-melf_x86_64"