diff options
author | Ken Raeburn <raeburn@cygnus> | 1993-08-20 22:21:49 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1993-08-20 22:21:49 +0000 |
commit | d24928c05b015102d55d24e783244751095eefa9 (patch) | |
tree | faab6ef85036c4f1ba7058ae76e6b396f6ab38d0 /bfd/libelf.h | |
parent | 018ab14f5986aba3e040eaf0d568b12315f87567 (diff) | |
download | gdb-d24928c05b015102d55d24e783244751095eefa9.zip gdb-d24928c05b015102d55d24e783244751095eefa9.tar.gz gdb-d24928c05b015102d55d24e783244751095eefa9.tar.bz2 |
* elfcode.h (elf_build_phdrs): Unused function deleted.
(bfd_shdr_from_section): Ditto.
(write_relocs): Don't change section contents for addend.
(elf_locate_sh): Return type is now always elf_internal_shdr, since the other
types were really aliases for this type anyways. Don't compile this function,
since it is static and doesn't appear to be used in this file.
(sym_is_global): Return non-zero for weak symbols. Abort if sec ptr is null.
(swap_out_syms): Reorder tests so function symbols can be weak.
(elf_slurp_symbol_table): Don't use BSF_EXPORT.
(elf_slurp_reloca_table): Make RELOC_PROCESSING section smaller by
extracting out some common code. Abort if BFD section symbol has null name.
(elf_slurp_reloc_table): Translate ELF section symbols into BFD section
symbols. Don't read section contents to fill in addend field.
* Merged from OSF:
Tue Jun 15 14:38:32 1993 Michael Meissner (meissner@osf.org)
* libelf.h (struct Elf_Sym_Extra): New structure to contain ELF
specific information for a symbol. Put in elf_sym_num, which
gives the external symbol number in the elf object file, since
local symbols must come before global symbols.
(elf_sym_extra): New macro.
(elf_symtab_map): Delete, in favor of using Elf_Sym_Extra.
* elfcode.h (elf_map_symbols): Use Elf_Sym_Extra to map internal
symbol number to external number. Store the address of the
Elf_Sym_Extra field for the symbol in the udata field.
(elf_write_object_contents): Use Elf_Sym_Extra to map out symbols.
Sun Jun 20 16:30:11 1993 Michael Meissner (meissner@osf.org)
* elfcode.h (elf_obj_tdata): Add field to count the size of the
array of pointers to section symbols.
(elf_map_symbols): Bump the max index of the section symbols so
that we don't overwrite memory. Store the max index into the
elf_obj_tdata field.
Sat Jun 19 10:12:27 1993 Michael Meissner (meissner@osf.org)
* elfcode.h (elf_obj_tdata): Add pointer to an array of pointers
to the section symbols we created. Remove unused field internal_syms.
(elf_map_symbols): Fill in array of pointers to section symbols. Only create
section symbols for sections that have SEC_ALLOC set, and have non-zero size.
(elf_symbol_from_bfd_symbol): If udata is NULL, and this is a section symbol,
look up the section in the list of section symbols, and set the udata pointer
appropriately. Otherwise, if udata is still NULL, fail an assertion, and use
0, instead of dropping core.
Diffstat (limited to 'bfd/libelf.h')
-rw-r--r-- | bfd/libelf.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bfd/libelf.h b/bfd/libelf.h index 1f0f1a5..f5bc2c8 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -98,6 +98,13 @@ struct elf_backend_data PTR global_sym; }; +struct elf_sym_extra +{ + int elf_sym_num; /* sym# after locals/globals are reordered */ +}; + +typedef struct elf_sym_extra Elf_Sym_Extra; + struct bfd_elf_arch_map { enum bfd_architecture bfd_arch; int elf_arch; @@ -139,11 +146,12 @@ struct elf_obj_tdata struct strtab *strtab_ptr; int num_locals; int num_globals; - int *symtab_map; PTR raw_syms; /* Elf_External_Sym* */ Elf_Internal_Sym *internal_syms; PTR symbols; /* elf_symbol_type */ -/* struct strtab *shstrtab;*/ + Elf_Sym_Extra *sym_extra; + asymbol **section_syms; /* STT_SECTION symbols for each section */ + int num_section_syms; /* number of section_syms allocated */ Elf_Internal_Shdr symtab_hdr; Elf_Internal_Shdr shstrtab_hdr; Elf_Internal_Shdr strtab_hdr; @@ -160,7 +168,9 @@ struct elf_obj_tdata #define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section) #define elf_num_locals(bfd) (elf_tdata(bfd) -> num_locals) #define elf_num_globals(bfd) (elf_tdata(bfd) -> num_globals) -#define elf_symtab_map(bfd) (elf_tdata(bfd) -> symtab_map) +#define elf_sym_extra(bfd) (elf_tdata(bfd) -> sym_extra) +#define elf_section_syms(bfd) (elf_tdata(bfd) -> section_syms) +#define elf_num_section_syms(bfd) (elf_tdata(bfd) -> num_section_syms) #define core_prpsinfo(bfd) (elf_tdata(bfd) -> prpsinfo) #define core_prstatus(bfd) (elf_tdata(bfd) -> prstatus) #define obj_symbols(bfd) ((elf_symbol_type*)(elf_tdata(bfd) -> symbols)) |