From dcf507a6ee15da805fbe39e510d7ab7fbf2b09f6 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 17 Jan 2005 17:44:41 +0000 Subject: [PATCH] * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions. (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA instructions. If the amount of padding is known, reduce the size of the CIE or FDE by that amount. --- bfd/ChangeLog | 7 + bfd/elf-eh-frame.c | 125 +++++++++- ld/testsuite/ChangeLog | 5 + ld/testsuite/ld-mips-elf/eh-frame2-n32.d | 255 +++++++++++++++++++ ld/testsuite/ld-mips-elf/eh-frame2-n64.d | 409 +++++++++++++++++++++++++++++++ ld/testsuite/ld-mips-elf/mips-elf.exp | 2 + 6 files changed, 799 insertions(+), 4 deletions(-) create mode 100644 ld/testsuite/ld-mips-elf/eh-frame2-n32.d create mode 100644 ld/testsuite/ld-mips-elf/eh-frame2-n64.d diff --git a/bfd/ChangeLog b/bfd/ChangeLog index aabc387..eb7d83e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ 2005-01-17 Richard Sandiford + * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions. + (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA + instructions. If the amount of padding is known, reduce the size + of the CIE or FDE by that amount. + +2005-01-17 Richard Sandiford + * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and augmentation_size. Use bfd_signed_vmas for data_align. * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of... diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 9ccf561..ab316ad 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -260,6 +260,102 @@ size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment) + alignment - 1) & -alignment; } +/* Assume that the bytes between *ITER and END are CFA instructions. + Try to move *ITER past the first instruction and return true on + success. ENCODED_PTR_WIDTH gives the width of pointer entries. */ + +static bfd_boolean +skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width) +{ + bfd_byte op; + bfd_vma length; + + if (!read_byte (iter, end, &op)) + return FALSE; + + switch (op & 0x80 ? op & 0xc0 : op) + { + case DW_CFA_nop: + case DW_CFA_advance_loc: + case DW_CFA_restore: + /* No arguments. */ + return TRUE; + + case DW_CFA_offset: + case DW_CFA_restore_extended: + case DW_CFA_undefined: + case DW_CFA_same_value: + case DW_CFA_def_cfa_register: + case DW_CFA_def_cfa_offset: + case DW_CFA_def_cfa_offset_sf: + case DW_CFA_GNU_args_size: + /* One leb128 argument. */ + return skip_leb128 (iter, end); + + case DW_CFA_offset_extended: + case DW_CFA_register: + case DW_CFA_def_cfa: + case DW_CFA_offset_extended_sf: + case DW_CFA_GNU_negative_offset_extended: + case DW_CFA_def_cfa_sf: + /* Two leb128 arguments. */ + return (skip_leb128 (iter, end) + && skip_leb128 (iter, end)); + + case DW_CFA_def_cfa_expression: + /* A variable-length argument. */ + return (read_uleb128 (iter, end, &length) + && skip_bytes (iter, end, length)); + + case DW_CFA_expression: + /* A leb128 followed by a variable-length argument. */ + return (skip_leb128 (iter, end) + && read_uleb128 (iter, end, &length) + && skip_bytes (iter, end, length)); + + case DW_CFA_set_loc: + return skip_bytes (iter, end, encoded_ptr_width); + + case DW_CFA_advance_loc1: + return skip_bytes (iter, end, 1); + + case DW_CFA_advance_loc2: + return skip_bytes (iter, end, 2); + + case DW_CFA_advance_loc4: + return skip_bytes (iter, end, 4); + + case DW_CFA_MIPS_advance_loc8: + return skip_bytes (iter, end, 8); + + default: + return FALSE; + } +} + +/* Try to interpret the bytes between BUF and END as CFA instructions. + If every byte makes sense, return a pointer to the first DW_CFA_nop + padding byte, or END if there is no padding. Return null otherwise. + ENCODED_PTR_WIDTH is as for skip_cfa_op. */ + +static bfd_byte * +skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width) +{ + bfd_byte *last; + + last = buf; + while (buf < end) + if (*buf == DW_CFA_nop) + buf++; + else + { + if (!skip_cfa_op (&buf, end, encoded_ptr_width)) + return 0; + last = buf; + } + return last; +} + /* This function is called for each input file before the .eh_frame section is relocated. It discards duplicate CIEs and FDEs for discarded functions. The function returns TRUE iff any entries have been @@ -356,7 +452,7 @@ _bfd_elf_discard_section_eh_frame for (;;) { unsigned char *aug; - bfd_byte *start, *end; + bfd_byte *start, *end, *insns; bfd_size_type length; if (sec_info->count == sec_info->alloced) @@ -602,12 +698,13 @@ _bfd_elf_discard_section_eh_frame if (cie.fde_encoding == DW_EH_PE_omit) cie.fde_encoding = DW_EH_PE_absptr; - initial_insn_length = cie.hdr.length - (buf - last_fde - 4); + initial_insn_length = end - buf; if (initial_insn_length <= 50) { cie.initial_insn_length = initial_insn_length; memcpy (cie.initial_instructions, buf, initial_insn_length); } + insns = buf; buf += initial_insn_length; ENSURE_NO_RELOCS (buf); last_cie = last_fde; @@ -648,18 +745,38 @@ _bfd_elf_discard_section_eh_frame /* Skip the augmentation size, if present. */ if (cie.augmentation[0] == 'z') - REQUIRE (skip_leb128 (&buf, end)); + REQUIRE (read_uleb128 (&buf, end, &length)); + else + length = 0; /* Of the supported augmentation characters above, only 'L' adds augmentation data to the FDE. This code would need to be adjusted if any future augmentations do the same thing. */ if (cie.lsda_encoding != DW_EH_PE_omit) - this_inf->lsda_offset = buf - start; + { + this_inf->lsda_offset = buf - start; + /* If there's no 'z' augmentation, we don't know where the + CFA insns begin. Assume no padding. */ + if (cie.augmentation[0] != 'z') + length = end - buf; + } + + /* Skip over the augmentation data. */ + REQUIRE (skip_bytes (&buf, end, length)); + insns = buf; buf = last_fde + 4 + hdr.length; SKIP_RELOCS (buf); } + /* Try to interpret the CFA instructions and find the first + padding nop. Shrink this_inf's size so that it doesn't + including the padding. */ + length = get_DW_EH_PE_width (cie.fde_encoding, ptr_size); + insns = skip_non_nops (insns, end, length); + if (insns != 0) + this_inf->size -= end - insns; + this_inf->fde_encoding = cie.fde_encoding; this_inf->lsda_encoding = cie.lsda_encoding; sec_info->count++; diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 3e6593f..7db3064 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Richard Sandiford + + * ld-mips-elf/eh-frame2-{n32,n64}.d: New tests. + * ld-mips-elf/mips-elf.exp: Run them. + 2005-01-17 Andrew Stubbs * ld-sh/arch/arch.exp: Correct the email address. diff --git a/ld/testsuite/ld-mips-elf/eh-frame2-n32.d b/ld/testsuite/ld-mips-elf/eh-frame2-n32.d new file mode 100644 index 0000000..1345658 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/eh-frame2-n32.d @@ -0,0 +1,255 @@ +#name: MIPS eh-frame 2, n32 +#source: eh-frame1.s +#source: eh-frame1.s +#as: -EB -n32 --defsym alignment=2 --defsym fill=0 +#readelf: --relocs -wf +#ld: -shared -melf32btsmipn32 -Teh-frame1.ld + +Relocation section '\.rel\.dyn' .*: + *Offset .* +00000000 00000000 R_MIPS_NONE * +# Initial PCs for the FDEs attached to CIE 0xb8 +000300d8 00000003 R_MIPS_REL32 * +000300ec 00000003 R_MIPS_REL32 * +# Likewise CIE 0x218 +00030238 00000003 R_MIPS_REL32 * +0003024c 00000003 R_MIPS_REL32 * +0003008b 00000503 R_MIPS_REL32 00000000 foo +000300cc 00000503 R_MIPS_REL32 00000000 foo +0003010a 00000503 R_MIPS_REL32 00000000 foo +000301eb 00000503 R_MIPS_REL32 00000000 foo +0003022c 00000503 R_MIPS_REL32 00000000 foo +0003026a 00000503 R_MIPS_REL32 00000000 foo +#... +The section \.eh_frame contains: + +00000000 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000014 00000010 00000018 FDE cie=00000000 pc=00020000..00020010 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000028 00000010 0000002c FDE cie=00000000 pc=00020010..00020030 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic2 removed +0000003c 00000010 00000040 FDE cie=00000000 pc=00020030..00020060 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic3 removed +00000050 00000010 00000054 FDE cie=00000000 pc=00020060..000200a0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic4 removed +00000064 00000010 00000068 FDE cie=00000000 pc=000200a0..000200f0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000078 00000014 00000000 CIE + Version: 1 + Augmentation: "zRP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 00 00 00 00 00 + + DW_CFA_nop + +00000090 00000010 0000001c FDE cie=00000078 pc=000200f0..00020100 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000a4 00000010 00000030 FDE cie=00000078 pc=00020100..00020120 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000b8 00000014 00000000 CIE + Version: 1 + Augmentation: "zP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 50 00 00 00 00 00 00 00 + + +000000d0 00000010 0000001c FDE cie=000000b8 pc=00020120..00020130 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000e4 00000010 00000030 FDE cie=000000b8 pc=00020130..00020150 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000f8 00000014 00000000 CIE + Version: 1 + Augmentation: "zPR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 00 00 00 00 00 10 + + DW_CFA_nop + +00000110 00000010 0000001c FDE cie=000000f8 pc=00020150..00020160 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# FDE for .discard removed +# zPR2 removed +00000124 00000010 00000030 FDE cie=000000f8 pc=00020160..00020190 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000138 00000010 00000044 FDE cie=000000f8 pc=00020190..000201d0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0000014c 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000160 00000010 00000018 FDE cie=0000014c pc=000201d0..000201e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic1 removed, followed by repeat of above +00000174 00000010 0000002c FDE cie=0000014c pc=000201e0..000201f0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000188 00000010 00000040 FDE cie=0000014c pc=000201f0..00020210 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0000019c 00000010 00000054 FDE cie=0000014c pc=00020210..00020240 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000001b0 00000010 00000068 FDE cie=0000014c pc=00020240..00020280 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000001c4 00000010 0000007c FDE cie=0000014c pc=00020280..000202d0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000001d8 00000014 00000000 CIE + Version: 1 + Augmentation: "zRP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 00 00 00 00 00 + + DW_CFA_nop + +000001f0 00000010 0000001c FDE cie=000001d8 pc=000202d0..000202e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000204 00000010 00000030 FDE cie=000001d8 pc=000202e0..00020300 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000218 00000014 00000000 CIE + Version: 1 + Augmentation: "zP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 50 00 00 00 00 00 00 00 + + +00000230 00000010 0000001c FDE cie=00000218 pc=00020300..00020310 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000244 00000010 00000030 FDE cie=00000218 pc=00020310..00020330 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000258 00000014 00000000 CIE + Version: 1 + Augmentation: "zPR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 00 00 00 00 00 10 + + DW_CFA_nop + +00000270 00000010 0000001c FDE cie=00000258 pc=00020330..00020340 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000284 00000010 00000030 FDE cie=00000258 pc=00020340..00020370 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000298 00000010 00000044 FDE cie=00000258 pc=00020370..000203b0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000002ac 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000002c0 00000010 00000018 FDE cie=000002ac pc=000203b0..000203c0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + diff --git a/ld/testsuite/ld-mips-elf/eh-frame2-n64.d b/ld/testsuite/ld-mips-elf/eh-frame2-n64.d new file mode 100644 index 0000000..b817bbc --- /dev/null +++ b/ld/testsuite/ld-mips-elf/eh-frame2-n64.d @@ -0,0 +1,409 @@ +#name: MIPS eh-frame 2, n64 +#source: eh-frame1.s +#source: eh-frame1.s +#as: -EB -64 --defsym alignment=3 --defsym fill=0 +#readelf: --relocs -wf +#ld: -shared -melf64btsmip -Teh-frame1.ld + +Relocation section '\.rel\.dyn' .*: + *Offset .* +000000000000 000000000000 R_MIPS_NONE * + *Type2: R_MIPS_NONE * + *Type3: R_MIPS_NONE * +# Initial PCs for the FDEs attached to CIE 0x118 +000000030140 000000001203 R_MIPS_REL32 * + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +000000030160 000000001203 R_MIPS_REL32 * + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +# Likewise CIE 0x330 +000000030358 000000001203 R_MIPS_REL32 * + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +000000030378 000000001203 R_MIPS_REL32 * + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +0000000300cb 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +000000030130 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +00000003018a 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +0000000302e3 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +000000030348 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +0000000303a2 000500001203 R_MIPS_REL32 0000000000000000 foo + *Type2: R_MIPS_64 * + *Type3: R_MIPS_NONE * +#... +The section \.eh_frame contains: + +00000000 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000018 0000001c 0000001c FDE cie=00000000 pc=00020000..00020010 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000038 0000001c 0000003c FDE cie=00000000 pc=00020010..00020030 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic2 removed +00000058 0000001c 0000005c FDE cie=00000000 pc=00020030..00020060 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic3 removed +00000078 0000001c 0000007c FDE cie=00000000 pc=00020060..000200a0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic4 removed +00000098 0000001c 0000009c FDE cie=00000000 pc=000200a0..000200f0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000b8 0000001c 00000000 CIE + Version: 1 + Augmentation: "zRP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 00 00 00 00 00 00 00 00 00 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000d8 0000001c 00000024 FDE cie=000000b8 pc=000200f0..00020100 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000000f8 0000001c 00000044 FDE cie=000000b8 pc=00020100..00020120 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000118 0000001c 00000000 CIE + Version: 1 + Augmentation: "zP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + +00000138 0000001c 00000024 FDE cie=00000118 pc=00020120..00020130 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000158 0000001c 00000044 FDE cie=00000118 pc=00020130..00020150 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000178 0000001c 00000000 CIE + Version: 1 + Augmentation: "zPR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 00 00 00 00 00 00 00 00 00 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000198 0000001c 00000024 FDE cie=00000178 pc=00020150..00020160 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# FDE for .discard removed +# zPR2 removed +000001b8 0000001c 00000044 FDE cie=00000178 pc=00020160..00020190 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000001d8 0000001c 00000064 FDE cie=00000178 pc=00020190..000201d0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000001f8 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000210 0000001c 0000001c FDE cie=000001f8 pc=000201d0..000201e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +# basic1 removed, followed by repeat of above +00000230 0000001c 0000003c FDE cie=000001f8 pc=000201e0..000201f0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000250 0000001c 0000005c FDE cie=000001f8 pc=000201f0..00020210 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000270 0000001c 0000007c FDE cie=000001f8 pc=00020210..00020240 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000290 0000001c 0000009c FDE cie=000001f8 pc=00020240..00020280 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000002b0 0000001c 000000bc FDE cie=000001f8 pc=00020280..000202d0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000002d0 0000001c 00000000 CIE + Version: 1 + Augmentation: "zRP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 00 00 00 00 00 00 00 00 00 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000002f0 0000001c 00000024 FDE cie=000002d0 pc=000202d0..000202e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000310 0000001c 00000044 FDE cie=000002d0 pc=000202e0..00020300 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000330 0000001c 00000000 CIE + Version: 1 + Augmentation: "zP" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + +00000350 0000001c 00000024 FDE cie=00000330 pc=00020300..00020310 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000370 0000001c 00000044 FDE cie=00000330 pc=00020310..00020330 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000390 0000001c 00000000 CIE + Version: 1 + Augmentation: "zPR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 00 00 00 00 00 00 00 00 00 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000003b0 0000001c 00000024 FDE cie=00000390 pc=00020330..00020340 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000003d0 0000001c 00000044 FDE cie=00000390 pc=00020340..00020370 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +000003f0 0000001c 00000064 FDE cie=00000390 pc=00020370..000203b0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000410 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: 4 + Return address column: 31 + Augmentation data: 10 + + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +00000428 0000001c 0000001c FDE cie=00000410 pc=000203b0..000203c0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index 63fe3f0..be70106 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -78,6 +78,8 @@ run_dump_test "reloc-merge-lo16" if {$has_newabi && $linux_gnu} { run_dump_test "eh-frame1-n32" run_dump_test "eh-frame1-n64" + run_dump_test "eh-frame2-n32" + run_dump_test "eh-frame2-n64" } run_dump_test "jaloverflow" -- 2.7.4