aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-04-02 19:57:33 +0000
committerIan Lance Taylor <ian@airs.com>1996-04-02 19:57:33 +0000
commit19bfbcbecf49abb63d85b0244dc10770e3b4ac9a (patch)
treebcb51a8133c664730198d4e418b454e4bd93dd5b /bfd/elf-bfd.h
parent1dad72bde57b9d2f3a0e128000dc7220c33fe415 (diff)
downloadgdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.zip
gdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.tar.gz
gdb-19bfbcbecf49abb63d85b0244dc10770e3b4ac9a.tar.bz2
* elf-bfd.h (struct elf_link_hash_table): Add hgot field.
* elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field. * elflink.c (_bfd_elf_create_got_section): Store the _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field. * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the global offset table goes over 0x1000, set the value of _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section. (elf32_sparc_relocate_section): Subtract the offset of _GLOBAL_OFFSET_TABLE_ when handling GOT relocations. PR 9323.
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 b606063..987425e 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -126,6 +126,10 @@ struct elf_link_hash_entry
#define ELF_LINK_HASH_NEEDS_COPY 040
/* Symbol needs a procedure linkage table entry. */
#define ELF_LINK_HASH_NEEDS_PLT 0100
+ /* Symbol appears in a non-ELF input file. */
+#define ELF_LINK_NON_ELF 0200
+ /* Note: If you add more flags, you must change the type of
+ elf_link_hash_flags. */
};
/* ELF linker hash table. */
@@ -152,6 +156,8 @@ struct elf_link_hash_table
/* A linked list of DT_NEEDED names found in dynamic objects
included in the link. */
struct bfd_link_needed_list *needed;
+ /* The _GLOBAL_OFFSET_TABLE_ symbol. */
+ struct elf_link_hash_entry *hgot;
};
/* Look up an entry in an ELF linker hash table. */
@@ -446,9 +452,6 @@ struct elf_backend_data
unsigned want_got_plt : 1;
unsigned plt_readonly : 1;
unsigned want_plt_sym : 1;
-
- /* Put ELF and program headers in the first loadable segment. */
- unsigned want_hdr_in_seg : 1;
};
/* Information stored for each BFD section in an ELF file. This
@@ -578,9 +581,13 @@ struct elf_obj_tdata
/* The linker ELF emulation code needs to let the backend ELF linker
know what filename should be used for a dynamic object if the
- dynamic object is found using a search. This field is used to
- hold that information. */
- const char *dt_needed_name;
+ dynamic object is found using a search. The emulation code then
+ sometimes needs to know what name was actually used. Until the
+ file has been added to the linker symbol table, this field holds
+ the name the linker wants. After it has been added, it holds the
+ name actually used, which will be the DT_SONAME entry if there is
+ one. */
+ const char *dt_name;
/* Irix 5 often screws up the symbol table, sorting local symbols
after global symbols. This flag is set if the symbol table in
@@ -624,7 +631,7 @@ struct elf_obj_tdata
#define elf_sym_hashes(bfd) (elf_tdata(bfd) -> sym_hashes)
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got_offsets)
#define elf_local_ptr_offsets(bfd) (elf_tdata(bfd) -> linker_section_pointers)
-#define elf_dt_needed_name(bfd) (elf_tdata(bfd) -> dt_needed_name)
+#define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name)
#define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab)
#define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init)
#define elf_linker_section(bfd,n) (elf_tdata(bfd) -> linker_section[(int)n])