Reimplement segment writing.
authorKen Raeburn <raeburn@cygnus>
Mon, 26 Jul 1993 19:27:56 +0000 (19:27 +0000)
committerKen Raeburn <raeburn@cygnus>
Mon, 26 Jul 1993 19:27:56 +0000 (19:27 +0000)
commit300adb3110ef9ae2622a710f456555905e7e9aaa
tree65351bfa2564141c5fb1bdcf5a231c1051dc38d4
parent08ecd8f3d858acd15a276e80e3de5f5a95996709
Reimplement segment writing.
(elf_write_phdrs): Use precomputed e_phoff rather than making assumptions.
(elf_build_phdrs): Disabled, for now.
(assign_file_position_for_section): Don't change file offset for SHT_NOBITS.
(assign_file_positions_for_symtab_and_strtabs): New function.
(struct seg_info): New type.
(map_program_segments): New function.
(assign_file_positions_except_relocs): For executables, leave section headers
&c for last, and properly align all sections with flag SHF_ALLOC set.
(prep_headers): No longer abort when EXEC_P is set.
(write_shdrs_and_ehdr): Deleted all code relating to program segments.

(various): Deleted some unused code, and debugging "malloc(0)" calls.
(write_relocs): Cache value of last symbol looked up, to save
time if the symbol is referred to repeatedly.
(elf_fake_sections): Check only SEC_RELOC flag, not number of relocs.
(assign_section_numbers): Likewise.
bfd/elfcode.h