aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-04-27 11:08:14 +0930
committerAlan Modra <amodra@gmail.com>2017-04-27 11:54:29 +0930
commitd7153c4ac333c9127c18efcf184607d368bb142d (patch)
tree72ca75116b4aadb183ba62ac329282406e67a064 /bfd/elf-bfd.h
parent641338d8e9b62bde9672f13f0dca2324b61e46e2 (diff)
downloadgdb-d7153c4ac333c9127c18efcf184607d368bb142d.zip
gdb-d7153c4ac333c9127c18efcf184607d368bb142d.tar.gz
gdb-d7153c4ac333c9127c18efcf184607d368bb142d.tar.bz2
Edit .eh_frame symbols
Experimental support for moving symbols defined in .eh_frame as their CIEs/FDEs are edited or merged. * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len. (_bfd_elf_adjust_eh_frame_global_symbol): Declare. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and aug_data_len. (offset_adjust): New function. (_bfd_elf_adjust_eh_frame_global_symbol): Likewise. (adjust_eh_frame_local_symbols): Likewise. (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols after changing anything. Return true if anything changed. * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call _bfd_elf_adjust_eh_frame_global_symbol for globals.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 2649939..bff6abc 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -326,6 +326,12 @@ struct eh_cie_fde
or 0 if the CIE doesn't have any. */
unsigned int personality_offset : 8;
+ /* Length of augmentation. aug_str_len is the length of the
+ string including null terminator. aug_data_len is the length
+ of the rest up to the initial insns. */
+ unsigned int aug_str_len : 3;
+ unsigned int aug_data_len : 5;
+
/* True if we have marked relocations associated with this CIE. */
unsigned int gc_mark : 1;
@@ -354,7 +360,7 @@ struct eh_cie_fde
unsigned int merged : 1;
/* Unused bits. */
- unsigned int pad1 : 17;
+ unsigned int pad1 : 9;
} cie;
} u;
unsigned int reloc_index;
@@ -2180,6 +2186,8 @@ extern bfd_boolean _bfd_elf_end_eh_frame_parsing
extern bfd_boolean _bfd_elf_discard_section_eh_frame
(bfd *, struct bfd_link_info *, asection *,
bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *);
+extern bfd_boolean _bfd_elf_adjust_eh_frame_global_symbol
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_discard_section_eh_frame_hdr
(bfd *, struct bfd_link_info *);
extern bfd_vma _bfd_elf_eh_frame_section_offset