You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _LIBELF_H_
#define _LIBELF_H_ 1
int (*write_out_phdrs) PARAMS ((bfd *, Elf_Internal_Phdr *, int));
boolean (*write_shdrs_and_ehdr) PARAMS ((bfd *));
void (*write_relocs) PARAMS ((bfd *, asection *, PTR));
- void (*swap_symbol_out) PARAMS ((bfd *, Elf_Internal_Sym *, char *));
+ void (*swap_symbol_out) PARAMS ((bfd *, Elf_Internal_Sym *, PTR));
boolean (*slurp_reloc_table) PARAMS ((bfd *, asection *, asymbol **));
long (*slurp_symbol_table) PARAMS ((bfd *, asymbol **, boolean));
};
entire ELF symbol table. */
boolean (*elf_backend_symbol_table_processing) PARAMS ((bfd *,
elf_symbol_type *,
- int));
+ unsigned int));
/* A function to do additional processing on the ELF section header
just before writing it out. This is used to set the flags and
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));
+
/* 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;
const struct elf_size_info *s;
- unsigned char want_got_plt : 1;
- unsigned char plt_readonly : 1;
- unsigned char want_plt_sym : 1;
+ 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
Elf_Internal_Shdr strtab_hdr;
Elf_Internal_Shdr dynsymtab_hdr;
Elf_Internal_Shdr dynstrtab_hdr;
- int symtab_section, shstrtab_section, strtab_section, dynsymtab_section;
+ unsigned int symtab_section, shstrtab_section;
+ unsigned int strtab_section, dynsymtab_section;
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) */
+ unsigned int gp_size; /* The gp size (MIPS only, for now) */
/* This is set to true if the object was created by the backend
linker. */
bfd_vma, CONST char **,
CONST char **,
unsigned int *));
+#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
+#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers PARAMS ((bfd *, boolean));
extern boolean _bfd_elf_new_section_hook PARAMS ((bfd *, asection *));
extern void bfd_elf32_swap_symbol_in
PARAMS ((bfd *, Elf32_External_Sym *, Elf_Internal_Sym *));
extern void bfd_elf32_swap_symbol_out
- PARAMS ((bfd *, Elf_Internal_Sym *, char *));
+ PARAMS ((bfd *, Elf_Internal_Sym *, PTR));
extern void bfd_elf32_swap_reloc_in
PARAMS ((bfd *, Elf32_External_Rel *, Elf_Internal_Rel *));
extern void bfd_elf32_swap_reloc_out
PARAMS ((bfd *, Elf32_External_Rela *, Elf_Internal_Rela *));
extern void bfd_elf32_swap_reloca_out
PARAMS ((bfd *, Elf_Internal_Rela *, Elf32_External_Rela *));
+extern void bfd_elf32_swap_phdr_in
+ PARAMS ((bfd *, Elf32_External_Phdr *, Elf_Internal_Phdr *));
+extern void bfd_elf32_swap_phdr_out
+ PARAMS ((bfd *, Elf_Internal_Phdr *, Elf32_External_Phdr *));
extern void bfd_elf32_swap_dyn_in
PARAMS ((bfd *, const Elf32_External_Dyn *, Elf_Internal_Dyn *));
extern void bfd_elf32_swap_dyn_out
extern void bfd_elf64_swap_symbol_in
PARAMS ((bfd *, Elf64_External_Sym *, Elf_Internal_Sym *));
extern void bfd_elf64_swap_symbol_out
- PARAMS ((bfd *, Elf_Internal_Sym *, Elf64_External_Sym *));
+ PARAMS ((bfd *, Elf_Internal_Sym *, PTR));
extern void bfd_elf64_swap_reloc_in
PARAMS ((bfd *, Elf64_External_Rel *, Elf_Internal_Rel *));
extern void bfd_elf64_swap_reloc_out
PARAMS ((bfd *, Elf64_External_Rela *, Elf_Internal_Rela *));
extern void bfd_elf64_swap_reloca_out
PARAMS ((bfd *, Elf_Internal_Rela *, Elf64_External_Rela *));
+extern void bfd_elf64_swap_phdr_in
+ PARAMS ((bfd *, Elf64_External_Phdr *, Elf_Internal_Phdr *));
+extern void bfd_elf64_swap_phdr_out
+ PARAMS ((bfd *, Elf_Internal_Phdr *, Elf64_External_Phdr *));
extern void bfd_elf64_swap_dyn_in
PARAMS ((bfd *, const Elf64_External_Dyn *, Elf_Internal_Dyn *));
extern void bfd_elf64_swap_dyn_out