forked from Imagelibrary/binutils-gdb
* elf32-mips.c: Extensive additions to do relocations and to
handle MIPS specific sections. * libelf.h (elf_backend_data): Pass fourth argument to elf_backend_section_from_bfd_section to permit it to control the section index to use. (elf_obj_tdata): Add gp and gp_size fields. (elf_gp, elf_gp_size): New accessor macros. * elfcode.h: Removed a number of unused local variables. (elf_fake_sections): Clear section header before calling elf_backend_fake_sections, not after. (prep_headers): Return true at end. (elf_section_from_bfd_section): Pass retval argument to elf_backend_section_from_bfd_section. * elf32-hppa.c (elf32_hppa_backend_section_from_bfd_section): Accept and ignore new retval argument. * bfd.c: Include libelf.h. (bfd_set_gp_size): Handle ELF targets. * Makefile.in (bfd.o): Depends upon libelf.h. (elf32-mips.o): Depends upon $(INCDIR)/elf/mips.h.
This commit is contained in:
@@ -71,7 +71,7 @@ struct elf_backend_data
|
||||
boolean (*elf_backend_section_processing) PARAMS ((bfd *, Elf32_Internal_Shdr *));
|
||||
boolean (*elf_backend_section_from_shdr) PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
|
||||
boolean (*elf_backend_fake_sections) PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
|
||||
boolean (*elf_backend_section_from_bfd_section) PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
|
||||
boolean (*elf_backend_section_from_bfd_section) PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *, int *));
|
||||
};
|
||||
|
||||
struct elf_sym_extra
|
||||
@@ -130,6 +130,8 @@ struct elf_obj_tdata
|
||||
file_ptr next_file_pos;
|
||||
void *prstatus; /* The raw /proc prstatus structure */
|
||||
void *prpsinfo; /* The raw /proc prpsinfo structure */
|
||||
bfd_vma gp; /* The gp value (MIPS only, for now) */
|
||||
int gp_size; /* The gp size (MIPS only, for now) */
|
||||
};
|
||||
|
||||
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
|
||||
@@ -146,6 +148,8 @@ struct elf_obj_tdata
|
||||
#define core_prstatus(bfd) (elf_tdata(bfd) -> prstatus)
|
||||
#define obj_symbols(bfd) (elf_tdata(bfd) -> symbols)
|
||||
#define obj_internal_syms(bfd) (elf_tdata(bfd) -> internal_syms)
|
||||
#define elf_gp(bfd) (elf_tdata(bfd) -> gp)
|
||||
#define elf_gp_size(bfd) (elf_tdata(bfd) -> gp_size)
|
||||
|
||||
extern char * elf_string_from_elf_section PARAMS ((bfd *, unsigned, unsigned));
|
||||
extern char * elf_get_str_section PARAMS ((bfd *, unsigned));
|
||||
|
||||
Reference in New Issue
Block a user