Line 4830... |
Line 4830... |
|
|
static bfd_boolean
|
static bfd_boolean
|
prep_headers (bfd *abfd)
|
prep_headers (bfd *abfd)
|
{
|
{
|
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
|
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
|
Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
|
|
struct elf_strtab_hash *shstrtab;
|
struct elf_strtab_hash *shstrtab;
|
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
|
|
i_ehdrp = elf_elfheader (abfd);
|
i_ehdrp = elf_elfheader (abfd);
|
|
|
Line 4898... |
Line 4898... |
/* It all happens later. */
|
/* It all happens later. */
|
;
|
;
|
else
|
else
|
{
|
{
|
i_ehdrp->e_phentsize = 0;
|
i_ehdrp->e_phentsize = 0;
|
i_phdrp = 0;
|
|
i_ehdrp->e_phoff = 0;
|
i_ehdrp->e_phoff = 0;
|
}
|
}
|
|
|
elf_tdata (abfd)->symtab_hdr.sh_name =
|
elf_tdata (abfd)->symtab_hdr.sh_name =
|
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", FALSE);
|
(unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", FALSE);
|
Line 4946... |
Line 4945... |
|
|
bfd_boolean
|
bfd_boolean
|
_bfd_elf_write_object_contents (bfd *abfd)
|
_bfd_elf_write_object_contents (bfd *abfd)
|
{
|
{
|
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
Elf_Internal_Ehdr *i_ehdrp;
|
|
Elf_Internal_Shdr **i_shdrp;
|
Elf_Internal_Shdr **i_shdrp;
|
bfd_boolean failed;
|
bfd_boolean failed;
|
unsigned int count, num_sec;
|
unsigned int count, num_sec;
|
|
|
if (! abfd->output_has_begun
|
if (! abfd->output_has_begun
|
&& ! _bfd_elf_compute_section_file_positions (abfd, NULL))
|
&& ! _bfd_elf_compute_section_file_positions (abfd, NULL))
|
return FALSE;
|
return FALSE;
|
|
|
i_shdrp = elf_elfsections (abfd);
|
i_shdrp = elf_elfsections (abfd);
|
i_ehdrp = elf_elfheader (abfd);
|
|
|
|
failed = FALSE;
|
failed = FALSE;
|
bfd_map_over_sections (abfd, bed->s->write_relocs, &failed);
|
bfd_map_over_sections (abfd, bed->s->write_relocs, &failed);
|
if (failed)
|
if (failed)
|
return FALSE;
|
return FALSE;
|