diff options
author | Catherine Moore <clm@redhat.com> | 2001-06-20 20:34:10 +0000 |
---|---|---|
committer | Catherine Moore <clm@redhat.com> | 2001-06-20 20:34:10 +0000 |
commit | 9317eaccac71a58fca33b448bfac3da8e2efe409 (patch) | |
tree | bb3bdd96d415dc736cc511e260ce2f48a56e5d07 /bfd/elf-bfd.h | |
parent | 161d71a6393454688d8c2bd2244e75ce9058b422 (diff) | |
download | gdb-9317eaccac71a58fca33b448bfac3da8e2efe409.zip gdb-9317eaccac71a58fca33b448bfac3da8e2efe409.tar.gz gdb-9317eaccac71a58fca33b448bfac3da8e2efe409.tar.bz2 |
* elf-bfd.h (struct elf_backend_data):
elf_backend_emit_relocs: New field: Function for emitting
relocs.
elf_backend_count_relocs: New field: Function for determining
the number of relocs to be emitted.
* elfxx-target.h: Provide default (NULL) values for
elf_backend_emit_relocs and elf_backend_count_relocs.
* elflink.h (elf_link_size_reloc_section): Make the hash table
big enough to hold the relocs counted by either reloc_count or
o->reloc_count.
(elf_bfd_final_link) emit_relocs: New boolean, set if relocs
should be emitted, either because of a command line option
stored in the info structure or because the target provides a
special reloc emitting function.
If the target provides a reloc counting function use it,
unless performing a relocatable link or emitting all relocs.
Also set the SEC_RELOC flag on any output section which will
contain relocs.
(elf_link_input_bfd): emit_relocs: New boolean, set if relocs
should be emitted, either because of a command line option
stored in the info structure or because the target provides a
special reloc emitting function.
If the target provides a reloc emitting function, use it,
unless performing a relocatable link or emitting all relocs.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index f5b74e9..a5693ff 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -618,6 +618,16 @@ struct elf_backend_data void (*elf_backend_hide_symbol) PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); + /* Emit relocations. Overrides default routine for emitting relocs, + except during a relocatable link, or if all relocs are being emitted. */ + void (*elf_backend_emit_relocs) + PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *)); + + /* Count relocations. Not called for relocatable links + or if all relocs are being preserved in the output. */ + unsigned int (*elf_backend_count_relocs) + PARAMS ((asection *, Elf_Internal_Rela *)); + /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap; |