[PATCH] C6X automagic cantinuwing marking

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

[PATCH] C6X automagic cantinuwing marking

Paul Brook
The patch below adds linker processing of C6X unwinding table sections.  As on
ARM we add CANTUNWIND entries for text sections with no correspongin unwinding
table, eliminate duplicate index entries.

The linker tests implicitly test the R_C6000_PREL31 relocation.


2011-05-03  Paul Brook  <[hidden email]>

        * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
        * bfd-in2.h: Regenerate.
        * elf32-tic6x.c: Include limits.h.
        (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
        _tic6x_elf_section_data): New.
        (elf32_tic6x_section_data): Define.
        (elf32_tic6x_new_section_hook): Allocate target specific data.
        (elf32_tic6x_add_unwind_table_edit): New function.
        (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
        elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
        elf32_tic6x_copy_exidx_entry): New functions.
        (elf_backend_write_section): Define.

        * emultempl/tic6xdsbt.em (merge_exidx_entries): New.
        (compare_output_sec_vma): New function.
        (gld${EMULATION_NAME}_after_allocation): New function.
        (PARSE_AND_LIST_OPTIONS): Add --no-merge-exidx-entries.
        * ld.texinfo: Document c6x --no-merge-exidx-entries.

        * ld-tic6x/discard-unwind.ld: New.
        * ld-tic6x/unwind.ld: New.
        * ld-tic6x/unwind-1.d: New test.
        * ld-tic6x/unwind-1.s: New test.
        * ld-tic6x/unwind-2.d: New test.
        * ld-tic6x/unwind-2.s: New test.
        * ld-tic6x/unwind-3.d: New test.
        * ld-tic6x/unwind-3.s: New test.
        * ld-tic6x/unwind-4.d: New test.
        * ld-tic6x/unwind-4.s: New test.
        * ld-tic6x/unwind-5.d: New test.
        * ld-tic6x/unwind-5.s: New test.
        * ld-tic6x/unwind-6.d: New test.

0004-exidx-merge.patch (29K) Download Attachment
Reply | Threaded
Open this post in threaded view

Re: [PATCH] C6X automagic cantinuwing marking

Joseph Myers
On Tue, 3 May 2011, Paul Brook wrote:

> +    /* Unwind info attached to an .ARM.exidx section.  */

Not ARM, c6xabi.

> +/* Increase the size of EXIDX_SEC by ADJUST bytes.  ADJUST mau be negative.  */

Typo "mau".

> +  /* Walk all text sections in order of increasing VMA.  Eilminate duplicate

Typo "Eilminate".

> +  /* If the high bit of the first word is clear, and the bit pattern is not 0x1
> +     (EXIDX_CANTUNWIND), this is an offset to an .ARM.extab entry.  */

Another stray ARM reference.

> +@kindex --no-merge-exidx-entries
> +The @samp{--no-merge-exidx-entries} switch disables the merging of adjacent exidx entries in debuginfo.

It's unwind information, not debug info.

> +    *(.glue_7)
> +    *(.v4_bx)

Stray ARM section references in linker script.

> +    *(.glue_7)
> +    *(.v4_bx)


OK with those issues fixed.  If the typos come from the ARM code you'll
probably want to fix them there as well in a separate patch.

Joseph S. Myers
[hidden email]