diff options
author | Catherine Moore <clm@codesourcery.com> | 2015-05-28 14:50:36 -0700 |
---|---|---|
committer | Catherine Moore <clm@codesourcery.com> | 2015-05-28 15:21:17 -0700 |
commit | 2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd (patch) | |
tree | ee50d831561b5130e49bb30dfedb47f326f3b9ef /gas/testsuite | |
parent | e970cb3401cf549accc92452f4888440fb983f39 (diff) | |
download | fsf-binutils-gdb-2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd.zip fsf-binutils-gdb-2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd.tar.gz fsf-binutils-gdb-2f0c68f23bb3132cd5ac466ca8775c0d9e4960cd.tar.bz2 |
Compact EH Support
The specification for the Compact EH format is available at:
https://github.com/MentorEmbedded/cxx-abi/blob/master/MIPSCompactEH.pdf
2015-05-28 Catherine Moore <clm@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
Paul Brook <paul@codesourcery.com>
bfd/
* bfd-in2.h: Regenerated.
* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
(COMPACT_EH_CANT_UNWIND_OPCODE): Define.
(dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
eh_frame_hdr_info.
(compact_eh_frame_hdr_info): Declare.
(eh_frame_hdr_info): Redeclare with union for dwarf-specific
fields and compact-eh fields.
(elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
(bfd_elf_section_data): Add eh_frame_entry_field.
(elf_section_eh_frame_entry): Define.
(bfd_elf_parse_eh_frame_entries): Declare.
(_bfd_elf_parse_eh_frame_entry): Declare.
(_bfd_elf_end_eh_frame_parsing): Declare.
(_bfd_elf_write_section_eh_frame_entry): Declare.
(_bfd_elf_eh_frame_entry_present): Declare.
(_bfd_elf_section_for_symbol): Declare.
* elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
(bfd_elf_record_eh_frame_entry): New function.
(_bfd_elf_parse_eh_frame_entry): New function.
(_bfd_elf_parse_eh_frame): Update hdr_info field references.
(cmp_eh_frame_hdr): New function.
(add_eh_frame_hdr_terminator): New function.
(_bfd_elf_end_eh_frame_parsing): New function.
(find_merged_cie): Update hdr_info field references.
(_bfd_elf_discard_section_eh_frame): Likewise.
(_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
(_bfd_elf_eh_frame_entry_present): New function.
(_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
(_bfd_elf_write_section_eh_frame_entry): New function.
(_bfd_elf_write_section_eh_frame): Update hdr_info field references.
(_bfd_elf_fixup_eh_frame_hdr): New function.
(write_compact_eh_frame_hdr): New function.
(write_dwarf_eh_frame_hdr): New function.
(_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
* elflink.c (_bfd_elf_section_for_symbol): New function.
(elf_section_ignore_discarded_relocs): Add Compact EH support.
(elf_link_input_bfd): Likewise.
(bfd_elf_final_link): Likewise.
(_bfd_elf_gc_mark): Likewise.
(bfd_elf_parse_eh_frame_entries): New function.
(bfd_elf_gc_sections): Add Compact EH support.
(bfd_elf_discard_info): Likewise.
* elfxx-mips.c: Include dwarf2.h.
(_bfd_mips_elf_compact_eh_encoding): New function.
(_bfd_mips_elf_cant_unwind_opcode): New function.
* elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
(_bfd_mips_elf_cant_unwind_opcode): Declare.
(elf_backend_compact_eh_encoding): Define.
(elf_backend_cant_unwind_opcode): Define.
* elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
(elf_backend_cant_unwind_opcode): Provide default.
(elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
elf_backend_cant_unwind_opcode.
* section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
gas/
* config/tc-alpha.c (all_cfi_sections): Declare.
(s_alpha_ent): Initialize all_cfi_sections.
(alpha_elf_md_end): Invoke cfi_set_sections.
* config/tc-mips.c (md_apply_fix): Handle BFD_RELOC_NONE.
(s_ehword): Use BFD_RELOC_32_PCREL.
(mips_fix_adjustable): Handle BFD_RELOC_32_PCREL.
(mips_cfi_reloc_for_encoding): New function.
* tc-mips.h (DWARF2_FDE_RELOC_SIZE): Redefine.
(DWARF2_FDE_RELOC_ENCODING): Define.
(tc_cfi_reloc_for_encoding): Define.
(mips_cfi_reloc_for_encoding): Define.
(tc_compact_eh_opcode_stop): Define.
(tc_compact_eh_opcode_pad): Define.
* doc/as.texinfo: Document Compact EH extensions.
* doc/internals.texi: Likewise.
* dw2gencfi.c (EH_FRAME_LINKONCE): Redefine.
(tc_cfi_reloc_for_encoding): Provide default.
(compact_eh): Declare.
(emit_expr_encoded): New function.
(get_debugseg_name): Add Compact EH support.
(alloc_debugseg_item): Likewise.
(cfi_set_sections): New function.
(dot_cfi_fde_data): New function.
(dot_cfi_personality_id): New function.
(dot_cfi_inline_lsda): New function.
(cfi_pseudo_table): Add cfi_fde_data, cfi_personality_id,
and cfi_inline_lsda.
(dot_cfi_personality): Add Compact EH support.
(dot_cfi_lsda): Likewise.
(dot_cfi_sections): Likewise.
(dot_cfi_startproc): Likewise.
(get_cfi_seg): Likewise.
(output_compact_unwind_data): New function.
(output_cfi_insn): Add Compact EH support.
(output_cie): Likewise.
(output_fde): Likewise.
(cfi_finish): Likewise.
(cfi_emit_eh_header): New function.
(output_eh_header): New function.
* dw2gencfi.h (cfi_set_sections): Declare.
(SUPPORT_COMPACT_EH): Define.
(MULTIPLE_FRAME_SECTIONS): Define.
New enumeration to describe the Compact EH header format.
(fde_entry): Add new fields personality_id, eh_header_type, eh_data_size,
eh_data, eh_loc and sections.
(CFI_EMIT_eh_frame, CFI_EMIT_debug_frame, CFI_EMIT_target,
CFI_EMIT_eh_frame_compact): Define.
2015-05-22 Catherine Moore <clm@codesourcery.com>
Bernd Schmidt <bernds@codesourcery.com>
gas/testsuite/
* gas/mips/mips.exp: Run new tests.
* gas/mips/compact-eh-1.s: New file.
* gas/mips/compact-eh-2.s: New file.
* gas/mips/compact-eh-3.s: New file.
* gas/mips/compact-eh-4.s: New file.
* gas/mips/compact-eh-5.s: New file.
* gas/mips/compact-eh-6.s: New file.
* gas/mips/compact-eh-7.s: New file.
* gas/mips/compact-eh-eb-1.d: New file.
* gas/mips/compact-eh-eb-2.d: New file.
* gas/mips/compact-eh-eb-3.d: New file.
* gas/mips/compact-eh-eb-4.d: New file.
* gas/mips/compact-eh-eb-5.d: New file.
* gas/mips/compact-eh-eb-6.d: New file.
* gas/mips/compact-eh-eb-7.d: New file.
* gas/mips/compact-eh-el-1.d: New file.
* gas/mips/compact-eh-el-2.d: New file.
* gas/mips/compact-eh-el-3.d: New file.
* gas/mips/compact-eh-el-4.d: New file.
* gas/mips/compact-eh-el-5.d: New file.
* gas/mips/compact-eh-el-6.d: New file.
* gas/mips/compact-eh-el-7.d: New file.
* gas/mips/compact-eh-err1.l: New file.
* gas/mips/compact-eh-err1.s: New file.
* gas/mips/compact-eh-err2.l: New file.
* gas/mips/compact-eh-err2.s: New file.
2015-05-22 Catherine Moore <clm@codesourcery.com>
include/
* bfdlink.h: Rename eh_frame_hdr to eh_frame_hdr_type.
2015-05-22 Catherine Moore <clm@codesourcery.com>
Paul Brook <paul@codesourcery.com>
ld/
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
Add Compact EH support.
* scripttempl/elf.sc: Handle .eh_frame_entry and .gnu_extab
sections.
2015-05-22 Catherine Moore <clm@codesourcery.com>
ld/testsuite/
* ld-mips-elf/compact-eh.ld: New linker script.
* ld-mips-elf/compact-eh1.d: New.
* ld-mips-elf/compact-eh1.s: New.
* ld-mips-elf/compact-eh1a.s: New.
* ld-mips-elf/compact-eh1b.s: New.
* ld-mips-elf/compact-eh2.d: New.
* ld-mips-elf/compact-eh2.s: New.
* ld-mips-elf/compact-eh3.d: New.
* ld-mips-elf/compact-eh3.s: New.
* ld-mips-elf/compact-eh3a.s: New.
* ld-mips-elf/compact-eh4.d: New.
* ld-mips-elf/compact-eh5.d: New.
* ld-mips-elf/compact-eh6.d: New.
* ld-mips-elf/mips-elf.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
27 files changed, 783 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 7f4b81b..4ee899a 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,35 @@ +2015-05-28 Catherine Moore <clm@codesourcery.com> + Bernd Schmidt <bernds@codesourcery.com> + + gas/testsuite/ + * gas/mips/mips.exp: Run new tests. + + * gas/mips/compact-eh-1.s: New file. + * gas/mips/compact-eh-2.s: New file. + * gas/mips/compact-eh-3.s: New file. + * gas/mips/compact-eh-4.s: New file. + * gas/mips/compact-eh-5.s: New file. + * gas/mips/compact-eh-6.s: New file. + * gas/mips/compact-eh-7.s: New file. + * gas/mips/compact-eh-eb-1.d: New file. + * gas/mips/compact-eh-eb-2.d: New file. + * gas/mips/compact-eh-eb-3.d: New file. + * gas/mips/compact-eh-eb-4.d: New file. + * gas/mips/compact-eh-eb-5.d: New file. + * gas/mips/compact-eh-eb-6.d: New file. + * gas/mips/compact-eh-eb-7.d: New file. + * gas/mips/compact-eh-el-1.d: New file. + * gas/mips/compact-eh-el-2.d: New file. + * gas/mips/compact-eh-el-3.d: New file. + * gas/mips/compact-eh-el-4.d: New file. + * gas/mips/compact-eh-el-5.d: New file. + * gas/mips/compact-eh-el-6.d: New file. + * gas/mips/compact-eh-el-7.d: New file. + * gas/mips/compact-eh-err1.l: New file. + * gas/mips/compact-eh-err1.s: New file. + * gas/mips/compact-eh-err2.l: New file. + * gas/mips/compact-eh-err2.s: New file. + 2015-05-15 H.J. Lu <hongjiu.lu@intel.com> PR binutis/18386 diff --git a/gas/testsuite/gas/mips/compact-eh-1.s b/gas/testsuite/gas/mips/compact-eh-1.s new file mode 100644 index 0000000..9c4f8d2 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-1.s @@ -0,0 +1,19 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: + nop + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40 + .cfi_endproc diff --git a/gas/testsuite/gas/mips/compact-eh-2.s b/gas/testsuite/gas/mips/compact-eh-2.s new file mode 100644 index 0000000..beeebda --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-2.s @@ -0,0 +1,28 @@ + .gnu_attribute 4, 1 + .abicalls + .hidden DW.ref.__gnu_compact_pr2 + .weak DW.ref.__gnu_compact_pr2 + .section .data.DW.ref.__gnu_compact_pr2,"awG",@progbits,DW.ref.__gnu_compact_pr2,comdat + .align 2 + .type DW.ref.__gnu_compact_pr2, @object + .size DW.ref.__gnu_compact_pr2, 4 +DW.ref.__gnu_compact_pr2: + .word __gnu_compact_pr2 + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality 0x1b, DW.ref.__gnu_compact_pr2 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: + nop + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40 + .cfi_endproc + .globl __gnu_compact_pr2 diff --git a/gas/testsuite/gas/mips/compact-eh-3.s b/gas/testsuite/gas/mips/compact-eh-3.s new file mode 100644 index 0000000..fd9def1 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-3.s @@ -0,0 +1,19 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: + nop + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40,0x3,0x5 + .cfi_endproc diff --git a/gas/testsuite/gas/mips/compact-eh-4.s b/gas/testsuite/gas/mips/compact-eh-4.s new file mode 100644 index 0000000..d0be1c7 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-4.s @@ -0,0 +1,47 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .cfi_lsda 0x1b,$LLSDA0 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: +$LEHB0 = . + nop +$LEHE0 = . + nop +$LEHB1 = . + nop +$LEHE1 = . + nop +$LEHB2 = . +$L3: + nop +$LEHE2 = . + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40 + .cfi_endproc + .cfi_inline_lsda 2 +$LLSDA0: + .byte 0x2 + .uleb128 $LLSDACSE0-$LLSDACSB0 +$LLSDACSB0: + .uleb128 ($LEHB0-$LFB0)|1 + .uleb128 ($LEHE0-$LEHB0) + .sleb128 -1 + .uleb128 ($LEHB1-$LEHE0)|1 + .uleb128 ($LEHE1-$LEHB1) + .sleb128 ($L3-($LEHE1)) + .sleb128 (0<<2)|0 + .uleb128 ($LEHB2-$LEHE1)|1 + .uleb128 ($LEHE2-$LEHB2) + .sleb128 -1 +$LLSDACSE0: diff --git a/gas/testsuite/gas/mips/compact-eh-5.s b/gas/testsuite/gas/mips/compact-eh-5.s new file mode 100644 index 0000000..aa9bdda --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-5.s @@ -0,0 +1,56 @@ + .gnu_attribute 4, 1 + .abicalls + .hidden DW.ref.__gnu_compact_pr2 + .weak DW.ref.__gnu_compact_pr2 + .section .data.DW.ref.__gnu_compact_pr2,"awG",@progbits,DW.ref.__gnu_compact_pr2,comdat + .align 2 + .type DW.ref.__gnu_compact_pr2, @object + .size DW.ref.__gnu_compact_pr2, 4 +DW.ref.__gnu_compact_pr2: + .word __gnu_compact_pr2 + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality 0x1b, DW.ref.__gnu_compact_pr2 + .cfi_lsda 0x1b,$LLSDA0 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: +$LEHB0 = . + nop +$LEHE0 = . + nop +$LEHB1 = . + nop +$LEHE1 = . + nop +$LEHB2 = . +$L3: + nop +$LEHE2 = . + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40 + .cfi_endproc + .globl __gnu_compact_pr2 + .cfi_inline_lsda 2 +$LLSDA0: + .byte 0x2 + .uleb128 $LLSDACSE0-$LLSDACSB0 +$LLSDACSB0: + .uleb128 ($LEHB0-$LFB0)|1 + .uleb128 ($LEHE0-$LEHB0) + .sleb128 -1 + .uleb128 ($LEHB1-$LEHE0)|1 + .uleb128 ($LEHE1-$LEHB1) + .sleb128 ($L3-($LEHE1)) + .sleb128 (0<<2)|0 + .uleb128 ($LEHB2-$LEHE1)|1 + .uleb128 ($LEHE2-$LEHB2) + .sleb128 -1 +$LLSDACSE0: diff --git a/gas/testsuite/gas/mips/compact-eh-6.s b/gas/testsuite/gas/mips/compact-eh-6.s new file mode 100644 index 0000000..2e49054 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-6.s @@ -0,0 +1,47 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .cfi_lsda 0x1b,$LLSDA0 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: +$LEHB0 = . + nop +$LEHE0 = . + nop +$LEHB1 = . + nop +$LEHE1 = . + nop +$LEHB2 = . +$L3: + nop +$LEHE2 = . + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40,0x3,0x5 + .cfi_endproc + .cfi_inline_lsda 2 +$LLSDA0: + .byte 0x2 + .uleb128 $LLSDACSE0-$LLSDACSB0 +$LLSDACSB0: + .uleb128 ($LEHB0-$LFB0)|1 + .uleb128 ($LEHE0-$LEHB0) + .sleb128 -1 + .uleb128 ($LEHB1-$LEHE0)|1 + .uleb128 ($LEHE1-$LEHB1) + .sleb128 ($L3-($LEHE1)) + .sleb128 (0<<2)|0 + .uleb128 ($LEHB2-$LEHE1)|1 + .uleb128 ($LEHE2-$LEHB2) + .sleb128 -1 +$LLSDACSE0: diff --git a/gas/testsuite/gas/mips/compact-eh-7.s b/gas/testsuite/gas/mips/compact-eh-7.s new file mode 100644 index 0000000..e7554d2 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-7.s @@ -0,0 +1,22 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: + nop + .cfi_def_cfa_offset -32 + nop + .cfi_def_cfa_offset 0 + + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_endproc diff --git a/gas/testsuite/gas/mips/compact-eh-eb-1.d b/gas/testsuite/gas/mips/compact-eh-eb-1.d new file mode 100644 index 0000000..2a233d6 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-1.d @@ -0,0 +1,25 @@ +#objdump: -sr +#name: Compact EH EB #1 with personality ID and FDE data +#source: compact-eh-1.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* + + +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .eh_frame_entry: + 0000 00000000 0104405c .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-2.d b/gas/testsuite/gas/mips/compact-eh-eb-2.d new file mode 100644 index 0000000..226a5ff --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-2.d @@ -0,0 +1,42 @@ +#objdump: -sr +#name: Compact EH EB #2 with personality routine and FDE data +#source: compact-eh-2.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]: +OFFSET TYPE VALUE +00000000 R_MIPS_32 __gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.gnu_extab\]: +OFFSET TYPE VALUE +00000001 R_MIPS_PC32 DW.ref.__gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .group: + 0000 00000001 00000007 .* +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .data.DW.ref.__gnu_compact_pr2: + 0000 00000000 .* +Contents of section .gnu_extab: + 0000 00000000 0004405c .* +Contents of section .eh_frame_entry: + 0000 00000001 00000000 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-3.d b/gas/testsuite/gas/mips/compact-eh-eb-3.d new file mode 100644 index 0000000..6782d2b --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-3.d @@ -0,0 +1,28 @@ +#objdump: -sr +#name: Compact EH EB #3 with personality id and large FDE data +#source: compact-eh-3.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 02044003 055c .* +Contents of section .eh_frame_entry: + 0000 00000001 00000000 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-4.d b/gas/testsuite/gas/mips/compact-eh-eb-4.d new file mode 100644 index 0000000..b9fe3c0 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-4.d @@ -0,0 +1,29 @@ +#objdump: -sr +#name: Compact EH EB #4 with personality id, FDE data and LSDA +#source: compact-eh-4.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 0204405c 020a0104 7f050404 0005047f .* +Contents of section .eh_frame_entry: + 0000 00000001 00000000 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-5.d b/gas/testsuite/gas/mips/compact-eh-eb-5.d new file mode 100644 index 0000000..fd278a1 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-5.d @@ -0,0 +1,44 @@ +#objdump: -sr +#name: Compact EH EB #5 with personality routine, FDE data and LSDA +#source: compact-eh-5.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]: +OFFSET TYPE VALUE +00000000 R_MIPS_32 __gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.gnu_extab\]: +OFFSET TYPE VALUE +00000001 R_MIPS_PC32 DW.ref.__gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .group: + 0000 00000001 00000007 .* +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .data.DW.ref.__gnu_compact_pr2: + 0000 00000000 .* +Contents of section .gnu_extab: + 0000 00000000 0004405c 020a0104 7f050404 .* + 0010 0005047f .* +Contents of section .eh_frame_entry: + 0000 00000001 00000000 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-6.d b/gas/testsuite/gas/mips/compact-eh-eb-6.d new file mode 100644 index 0000000..496be17 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-6.d @@ -0,0 +1,30 @@ +#objdump: -sr +#name: Compact EH EB #6 with personality id, LSDA and large FDE data +#source: compact-eh-6.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 02044003 055f5f5c 020a0104 7f050404 .* + 0010 0005047f .* +Contents of section .eh_frame_entry: + 0000 00000001 00000000 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-eb-7.d b/gas/testsuite/gas/mips/compact-eh-eb-7.d new file mode 100644 index 0000000..2daae3f --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-eb-7.d @@ -0,0 +1,35 @@ +#objdump: -sr +#name: Compact EH EB #7 with personality id and fallback FDE +#source: compact-eh-7.s +#as: -EB -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame\]: +OFFSET TYPE VALUE +0000001c R_MIPS_PC32 .text.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .eh_frame.* + + +Contents of section .text: + 0000 00000000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .eh_frame: + 0000 00000010 00000000 017a5200 017c1f01 .* + 0010 1b0d1d00 00000014 00000018 00000000 .* + 0020 00000008 00441308 440e0000 .* +Contents of section .eh_frame_entry: + 0000 00000001 00000015 .* +Contents of section .gnu.attributes: + 0000 41000000 0f676e75 00010000 00070401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-1.d b/gas/testsuite/gas/mips/compact-eh-el-1.d new file mode 100644 index 0000000..64abfba --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-1.d @@ -0,0 +1,25 @@ +#objdump: -sr +#name: Compact EH EL #1 with personality ID and FDE data +#source: compact-eh-1.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* + + +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .eh_frame_entry: + 0000 00000000 0104405c .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-2.d b/gas/testsuite/gas/mips/compact-eh-el-2.d new file mode 100644 index 0000000..80627eb --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-2.d @@ -0,0 +1,42 @@ +#objdump: -sr +#name: Compact EH EL #2 with personality routine and FDE data +#source: compact-eh-2.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]: +OFFSET TYPE VALUE +00000000 R_MIPS_32 __gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.gnu_extab\]: +OFFSET TYPE VALUE +00000001 R_MIPS_PC32 DW.ref.__gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .group: + 0000 01000000 07000000 .* +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .data.DW.ref.__gnu_compact_pr2: + 0000 00000000 .* +Contents of section .gnu_extab: + 0000 00000000 0004405c .* +Contents of section .eh_frame_entry: + 0000 01000000 00000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-3.d b/gas/testsuite/gas/mips/compact-eh-el-3.d new file mode 100644 index 0000000..aacfac2 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-3.d @@ -0,0 +1,28 @@ +#objdump: -sr +#name: Compact EH EL #3 with personality id and large FDE data +#source: compact-eh-3.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 02044003 055c .* +Contents of section .eh_frame_entry: + 0000 01000000 00000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-4.d b/gas/testsuite/gas/mips/compact-eh-el-4.d new file mode 100644 index 0000000..d3d85e1 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-4.d @@ -0,0 +1,29 @@ +#objdump: -sr +#name: Compact EH EL #4 with personality id, FDE data and LSDA +#source: compact-eh-4.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 0204405c 020a0104 7f050404 0005047f .* +Contents of section .eh_frame_entry: + 0000 01000000 00000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-5.d b/gas/testsuite/gas/mips/compact-eh-el-5.d new file mode 100644 index 0000000..7f07622 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-5.d @@ -0,0 +1,43 @@ +#objdump: -sr +#name: Compact EH EL #5 with personality routine, FDE data and LSDA +#source: compact-eh-5.s +#as: -EL -mno-pdr + +.*: file format.* + +RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]: +OFFSET TYPE VALUE +00000000 R_MIPS_32 __gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.gnu_extab\]: +OFFSET TYPE VALUE +00000001 R_MIPS_PC32 DW.ref.__gnu_compact_pr2 + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .group: + 0000 01000000 07000000 .* +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .data.DW.ref.__gnu_compact_pr2: + 0000 00000000 .* +Contents of section .gnu_extab: + 0000 00000000 0004405c 020a0104 7f050404 .* + 0010 0005047f .* +Contents of section .eh_frame_entry: + 0000 01000000 00000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-6.d b/gas/testsuite/gas/mips/compact-eh-el-6.d new file mode 100644 index 0000000..802a946 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-6.d @@ -0,0 +1,30 @@ +#objdump: -sr +#name: Compact EH EL #6 with personality id, LSDA and large FDE data +#source: compact-eh-6.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .gnu_extab + + +Contents of section .text: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .gnu_extab: + 0000 02044003 055f5f5c 020a0104 7f050404 .* + 0010 0005047f .* +Contents of section .eh_frame_entry: + 0000 01000000 00000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-el-7.d b/gas/testsuite/gas/mips/compact-eh-el-7.d new file mode 100644 index 0000000..c3c585e --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-el-7.d @@ -0,0 +1,35 @@ +#objdump: -sr +#name: Compact EH EL #7 with personality id and fallback FDE +#source: compact-eh-7.s +#as: -EL -mno-pdr + +.*: file format.* + + +RELOCATION RECORDS FOR \[.eh_frame\]: +OFFSET TYPE VALUE +0000001c R_MIPS_PC32 .text.* + + +RELOCATION RECORDS FOR \[.eh_frame_entry\]: +OFFSET TYPE VALUE +00000000 R_MIPS_PC32 .text.* +00000004 R_MIPS_PC32 .eh_frame.* + + +Contents of section .text: + 0000 00000000 00000000.* +Contents of section .reginfo: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section .MIPS.abiflags: + .* + .* +Contents of section .eh_frame: + 0000 10000000 00000000 017a5200 017c1f01 .* + 0010 1b0d1d00 14000000 18000000 00000000 .* + 0020 08000000 00441308 440e0000 .* +Contents of section .eh_frame_entry: + 0000 01000000 15000000 .* +Contents of section .gnu.attributes: + 0000 410f0000 00676e75 00010700 00000401 .* diff --git a/gas/testsuite/gas/mips/compact-eh-err1.l b/gas/testsuite/gas/mips/compact-eh-err1.l new file mode 100644 index 0000000..3ee03de --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-err1.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*:20: Error: .cfi_inline_lsda seen for frame without .cfi_lsda diff --git a/gas/testsuite/gas/mips/compact-eh-err1.s b/gas/testsuite/gas/mips/compact-eh-err1.s new file mode 100644 index 0000000..967313f --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-err1.s @@ -0,0 +1,20 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry +$LFB0 = . + .cfi_startproc + .cfi_personality_id 0x2 + .set nomips16 + .set nomicromips + .ent _Z3fooi + .type _Z3fooi, @function +_Z3fooi: + nop + .end _Z3fooi + .size _Z3fooi, .-_Z3fooi + .cfi_fde_data 0x4,0x40 + .cfi_endproc + .cfi_inline_lsda 1 diff --git a/gas/testsuite/gas/mips/compact-eh-err2.l b/gas/testsuite/gas/mips/compact-eh-err2.l new file mode 100644 index 0000000..c52976a --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-err2.l @@ -0,0 +1,2 @@ +.*: Assembler messages: +.*:7: Error: inconsistent uses of .cfi_sections diff --git a/gas/testsuite/gas/mips/compact-eh-err2.s b/gas/testsuite/gas/mips/compact-eh-err2.s new file mode 100644 index 0000000..acf83d1 --- /dev/null +++ b/gas/testsuite/gas/mips/compact-eh-err2.s @@ -0,0 +1,7 @@ + .gnu_attribute 4, 1 + .abicalls + .text + .align 2 + .globl _Z3fooi + .cfi_sections .eh_frame_entry + .cfi_sections .eh_frame diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index c3c3364..4568f24 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -570,6 +570,23 @@ if { [istarget mips*-*-vxworks*] } { "MIPS branch swapping ($count)" } + run_dump_test "compact-eh-eb-1" + run_dump_test "compact-eh-eb-2" + run_dump_test "compact-eh-eb-3" + run_dump_test "compact-eh-eb-4" + run_dump_test "compact-eh-eb-5" + run_dump_test "compact-eh-eb-6" + run_dump_test "compact-eh-eb-7" + run_dump_test "compact-eh-el-1" + run_dump_test "compact-eh-el-2" + run_dump_test "compact-eh-el-3" + run_dump_test "compact-eh-el-4" + run_dump_test "compact-eh-el-5" + run_dump_test "compact-eh-el-6" + run_dump_test "compact-eh-el-7" + run_list_test "compact-eh-err1" + run_list_test "compact-eh-err2" + run_dump_test "div" if { !$addr32 } { @@ -1139,7 +1156,6 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "align2-el" run_dump_test "align3" run_dump_test "odd-float" - run_dump_test "ehword" run_dump_test "insn-opts" run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \ |