diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-01 19:29:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-01 19:29:43 +0000 |
commit | d6f672b881f21e96280bfdaddb08002a220a0999 (patch) | |
tree | c080b1c6eb91148e532da3c8b8bc3cb208b77cc8 /bfd/libelf.h | |
parent | 0cb705689dfa2158883f11f34bbf1ede2523e51b (diff) | |
download | gdb-d6f672b881f21e96280bfdaddb08002a220a0999.zip gdb-d6f672b881f21e96280bfdaddb08002a220a0999.tar.gz gdb-d6f672b881f21e96280bfdaddb08002a220a0999.tar.bz2 |
Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
* elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
DT_FINI entry if the appropriate symbol is not in the hash table.
* libelf.h (struct elf_backend_data): Add create_program_headers
and want_hdr_in_seg fields.
* elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
defined.
(elf_backend_create_program_headers): Likewise.
(elfNN_bed): Initialize create_program_headers and
want_hdr_in_seg.
* elf.c (get_program_header_size): Call create_program_headers
backend routine.
(map_program_segments): Check want_hdr_in_seg backend field. Call
create_program_headers backend routine.
* elf.c (assign_file_positions_except_relocs): Align non allocated
sections when creating an executable.
* elfcode.h (elf_swap_phdr_in): Make non static.
(elf_swap_phdr_out): Make non static.
* libelf.h (bfd_elf32_swap_phdr_in): Declare.
(bfd_elf32_swap_phdr_out): Declare.
(bfd_elf64_swap_phdr_in): Declare.
(bfd_elf64_swap_phdr_out): Declare.
Diffstat (limited to 'bfd/libelf.h')
-rw-r--r-- | bfd/libelf.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bfd/libelf.h b/bfd/libelf.h index c0d2f7e..7a41be5 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -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; @@ -425,6 +433,9 @@ 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 @@ -654,6 +665,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 @@ -686,6 +701,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 |