From 6b2cc1401c75fb337cc4092d22eac4ccf491a0a9 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 15 Dec 2007 09:41:15 +0000 Subject: bfd/ * elf-bfd.h (eh_cie_fde): Move add_fde_encoding and per_encoding_relative to u.cie. Add commentary. * elf-eh-frame.c (cie): Remove make_relative. (extra_augmentation_string_bytes): Update use of add_fde_encoding. (extra_augmentation_data_bytes): Likewise. Use an FDE's own add_augmentation_size field, rather than referring to the CIE. (_bfd_elf_parse_eh_frame): Don't set the struct cie make_relative field; set the eh_cie_fde field directly. Update setting of add_fde_encoding and per_encoding_relative. Copy make_relative and add_augmentation_size from the CIE to the FDE. (_bfd_elf_discard_section_eh_frame): Use the FDE's own make_relative field. (_bfd_elf_eh_frame_section_offset): Likewise. (_bfd_elf_write_section_eh_frame): Update accesses to add_fde_encoding and per_encoding_relative. Use the FDE's own make_relative and add_augmentation_size fields. --- bfd/elf-bfd.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index a4e974f8b3..4b6c1af705 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -290,6 +290,14 @@ struct eh_cie_fde a PC-relative one. It is the group representative's setting that matters. */ unsigned int make_lsda_relative : 1; + + /* True if the CIE contains personality data and if that data + uses a PC-relative encoding. */ + unsigned int per_encoding_relative : 1; + + /* True if we need to add an 'R' (FDE encoding) entry to the + CIE's augmentation data. */ + unsigned int add_fde_encoding : 1; } cie; } u; unsigned int reloc_index; @@ -299,12 +307,25 @@ struct eh_cie_fde unsigned int fde_encoding : 8; unsigned int lsda_encoding : 8; unsigned int lsda_offset : 8; + + /* True if this entry represents a CIE, false if it represents an FDE. */ unsigned int cie : 1; + + /* True if this entry is currently marked for removal. */ unsigned int removed : 1; + + /* True if we need to add a 'z' (augmentation size) entry to the CIE's + augmentation data, and an associated byte to each of the CIE's FDEs. */ unsigned int add_augmentation_size : 1; - unsigned int add_fde_encoding : 1; + + /* True if we have decided to convert absolute FDE relocations into + relative ones. This applies to the first relocation in the FDE, + which is against the code that the FDE describes. */ unsigned int make_relative : 1; - unsigned int per_encoding_relative : 1; + + /* Unused bits. */ + unsigned int pad1 : 4; + unsigned int *set_loc; }; -- cgit v1.2.1