aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-01-11 21:06:42 +0000
committerIan Lance Taylor <ian@airs.com>1996-01-11 21:06:42 +0000
commit5b3b9ff61d3a2a6cdd90fcec1a61d38699f3c608 (patch)
tree4a38d859537ed0e9e8ac23a9e6b9989bd9bd9d0d /bfd/elf-bfd.h
parentf9407a89f45c77372d823af6a5aaffe23b2653b2 (diff)
downloadgdb-5b3b9ff61d3a2a6cdd90fcec1a61d38699f3c608.zip
gdb-5b3b9ff61d3a2a6cdd90fcec1a61d38699f3c608.tar.gz
gdb-5b3b9ff61d3a2a6cdd90fcec1a61d38699f3c608.tar.bz2
* elf32-mips.c: Extensive changes for a start at dynamic linking
support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>. * elf-bfd.h (struct elf_backend_data): Add type_change_ok field. (struct elf_backend_data): Remove elf_backend_create_program_headers field. Add elf_backend_additional_program_headers and elf_backend_modify_segment_map fields. * elfxx-target.h (elf_backend_type_change_ok): Define if not defined. (elf_backend_additional_program_headers): Likewise. (elf_backend_modify_segment_map): Likewise. (elf_backend_create_program_headers): Don't define. (elfNN_bed): Change to account for field changes. * elf.c (assign_file_positions_for_segments): Call new modify_segment_map backend function. Don't call old create_program_headers backend function. (get_program_header_size): Call additional_program_headers rather than create_program_headers. * elflink.h (elf_link_add_object_symbols): Initialize type_change_ok from new backend field. (elf_link_output_extsym): Don't warn if _rld_new_interface is defined. (elf_reloc_link_order): Treat a reloc against a defined symbol as a reloc against the appropriate section.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 75c8c5d..88e7858 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -212,6 +212,12 @@ struct elf_backend_data
section. */
boolean collect;
+ /* This is true if the linker should ignore changes to the type of a
+ symbol. This is true for MIPS ELF because some Irix 5 objects
+ record undefined functions as STT_OBJECT although the definitions
+ are STT_FUNC. */
+ boolean type_change_ok;
+
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
void (*elf_info_to_howto) PARAMS ((bfd *, arelent *,
@@ -412,13 +418,14 @@ struct elf_backend_data
void (*elf_backend_final_write_processing)
PARAMS ((bfd *, boolean linker));
- /* A function to create any special program headers required by the
- backend. PHDRS are the program headers, and PHDR_COUNT is the
- number of them. If PHDRS is NULL, this just counts headers
- without creating them. This returns an updated value for
- PHDR_COUNT. */
- int (*elf_backend_create_program_headers)
- PARAMS ((bfd *, Elf_Internal_Phdr *phdrs, int phdr_count));
+ /* This function is called by get_program_header_size. It should
+ return the number of additional program segments which this BFD
+ will need. It should return -1 on error. */
+ int (*elf_backend_additional_program_headers) PARAMS ((bfd *));
+
+ /* This function is called to modify an existing segment map in a
+ backend specific fashion. */
+ boolean (*elf_backend_modify_segment_map) PARAMS ((bfd *));
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */