[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/5526] eh support is broken

From: danglin at gcc dot gnu dot org
Subject: [Bug ld/5526] eh support is broken
Date: 30 Dec 2007 02:39:23 -0000

------- Additional Comments From danglin at gcc dot gnu dot org  2007-12-30 
02:39 -------
It appears this commit broke eh on hppa-linux:

CVSROOT:        /cvs/src
Module name:    src
Changes by:     address@hidden 2007-12-15 09:34:48

Modified files:
        bfd            : ChangeLog ecoff.c elf-bfd.h elf-eh-frame.c 
                         elflink.c section.c 

Log message:
        * elf-bfd.h (eh_cie_fde): Add u.fde.next_for_section and
        (bfd_elf_section_data): Add fde_list.
        (elf_fde_list): New macro.
        (elf_obj_tdata): Add eh_frame_section.
        (elf_eh_frame_section): New macro.
        (_bfd_elf_gc_mark_reloc): Remove last parameter.
        (_bfd_elf_gc_mark_fdes): Declare.
        * elf-eh-frame.c (_bfd_elf_get_eh_frame_sec_info): Chain the FDEs
        for each input section.
        (mark_entry, _bfd_elf_gc_mark_fdes): New functions.
        * elflink.c (_bfd_elf_gc_mark_reloc): Remove is_eh parameter.
        (_bfd_elf_gc_mark): Update call accordingly.  Mark the relocations
        againts the section's FDEs.  Don't mark the bfd's elf_eh_frame_section.
        (bfd_elf_gc_sections): Parse each input bfd's .eh_frame before
        marking any input sections.  Remove the current EH handling.
        * section.c (bfd_section): Remove gc_mark_from_eh.
        * ecoff.c (bfd_debug_section): Update initializer accordingly.

It's probably the unusal encoding (the only one that I could find that
allowed a eh frame header table given available relocation support):

/* This macro chooses the encoding of pointers embedded in the exception
   handling sections.  If at all possible, this should be defined such
   that the exception handling section will not require dynamic relocations,
   and so may be read-only.

   Because the HP assembler auto aligns, it is necessary to use
   DW_EH_PE_aligned.  It's not possible to make the data read-only
   on the HP-UX SOM port since the linker requires fixups for label
   differences in different sections to be word aligned.  However,
   the SOM linker can do unaligned fixups for absolute pointers.
   We also need aligned pointers for global and function pointers.

   Although the HP-UX 64-bit ELF linker can handle unaligned pc-relative
   fixups, the runtime doesn't have a consistent relationship between
   text and data for dynamically loaded objects.  Thus, it's not possible
   to use pc-relative encoding for pointers on this target.  It may be
   possible to use segment relative encodings but GAS doesn't currently
   have a mechanism to generate these encodings.  For other targets, we
   use pc-relative encoding for pointers.  If the pointer might require
   dynamic relocation, we make it indirect.  */
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                       \
  (TARGET_GAS && !TARGET_HPUX                                           \
   ? (DW_EH_PE_pcrel                                                    \
      | ((GLOBAL) || (CODE) == 2 ? DW_EH_PE_indirect : 0)               \
      | (TARGET_64BIT ? DW_EH_PE_sdata8 : DW_EH_PE_sdata4))             \
   : (!TARGET_GAS || (GLOBAL) || (CODE) == 2                            \
      ? DW_EH_PE_aligned : DW_EH_PE_absptr))

           What    |Removed                     |Added
                 CC|                            |rsandifo at sourceware dot
                   |                            |org


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]