aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-02-28 00:35:45 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-02-28 00:35:45 +0000
commitec3391e7041b496624293844c9746433b79d7562 (patch)
treef623d5ccc4c3df603aba588ffcd9c7ad191e7d1d /bfd/elf-bfd.h
parente6deed0a00341f58ff54db26d912ef9bfacd57ad (diff)
downloadgdb-ec3391e7041b496624293844c9746433b79d7562.zip
gdb-ec3391e7041b496624293844c9746433b79d7562.tar.gz
gdb-ec3391e7041b496624293844c9746433b79d7562.tar.bz2
* elf-bfd.h (struct elf_backend_data): Added
elf_backend_can_make_relative_eh_frame, elf_backend_can_make_lsda_relative_eh_frame and elf_backend_encode_eh_address. (_bfd_elf_encode_eh_address): Declare. (_bfd_elf_can_make_relative): Declare. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new hooks to decide whether to attempt to make_relative and make_lsda_relative. (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address. (_bfd_elf_can_make_relative): New. (_bfd_elf_encode_eh_address): New. * elf32-frv.c (frv_elf_use_relative_eh_frame): New. (frv_elf_encode_eh_address): New. (elf_backend_can_make_relative_eh_frame): Define. (elf_backend_can_make_lsda_relative_eh_frame): Define. (elf_backend_encode_eh_address): Define. * elfxx-target.h (elf_backend_can_make_relative_eh_frame): Define. (elf_backend_can_make_lsda_relative_eh_frame): Define. (elf_backend_encode_eh_address): Define. (elfNN_bed): Add them.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 6bbacad..3e861ea 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -860,6 +860,24 @@ struct elf_backend_data
bfd_boolean (*elf_backend_ignore_discarded_relocs)
(asection *);
+ /* These functions tell elf-eh-frame whether to attempt to turn
+ absolute or lsda encodings into pc-relative ones. The default
+ definition enables these transformations. */
+ bfd_boolean (*elf_backend_can_make_relative_eh_frame)
+ (bfd *, struct bfd_link_info *, asection *);
+ bfd_boolean (*elf_backend_can_make_lsda_relative_eh_frame)
+ (bfd *, struct bfd_link_info *, asection *);
+
+ /* This function returns an encoding after computing the encoded
+ value (and storing it in ENCODED) for the given OFFSET into OSEC,
+ to be stored in at LOC_OFFSET into the LOC_SEC input section.
+ The default definition chooses a 32-bit PC-relative encoding. */
+ bfd_byte (*elf_backend_encode_eh_address)
+ (bfd *abfd, struct bfd_link_info *info,
+ asection *osec, bfd_vma offset,
+ asection *loc_sec, bfd_vma loc_offset,
+ bfd_vma *encoded);
+
/* This function, if defined, may write out the given section.
Returns TRUE if it did so and FALSE if the caller should. */
bfd_boolean (*elf_backend_write_section)
@@ -1301,6 +1319,12 @@ extern void _bfd_elf_sprintf_vma
extern void _bfd_elf_fprintf_vma
(bfd *, void *, bfd_vma);
+extern bfd_byte _bfd_elf_encode_eh_address
+ (bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset,
+ asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded);
+extern bfd_boolean _bfd_elf_can_make_relative
+ (bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section);
+
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
(const Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rela_local_sym