* libecoff.h (struct ecoff_backend_data): Add adjust_headers
[deliverable/binutils-gdb.git] / bfd / libelf.h
index f48bbdb23d46dfa49a1c1376c9ab2fb1ff9e5f6f..92c0bc2be340694d7933f7c4cdf2aa3411fc4414 100644 (file)
@@ -16,7 +16,7 @@ GNU General Public License for more details.
 
 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
@@ -179,7 +179,7 @@ struct elf_size_info {
   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));
 };
@@ -249,7 +249,7 @@ struct elf_backend_data
      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
@@ -412,6 +412,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));
+
   /* 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;
@@ -422,9 +430,12 @@ struct elf_backend_data
 
   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
@@ -477,12 +488,13 @@ struct elf_obj_tdata
   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.  */
@@ -601,6 +613,8 @@ extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *,
                                                    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 *));
 
@@ -643,7 +657,7 @@ extern boolean bfd_elf32_bfd_final_link
 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
@@ -652,6 +666,10 @@ extern void bfd_elf32_swap_reloca_in
   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
@@ -675,7 +693,7 @@ extern boolean bfd_elf64_bfd_final_link
 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
@@ -684,6 +702,10 @@ extern void bfd_elf64_swap_reloca_in
   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
This page took 0.029891 seconds and 4 git commands to generate.