mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* elfcode.h (elf_set_section_contents): Support calling the backend
function elf_backend_begin_write_processing when just beginning to
write an object file.
* libelf.h (elf_backend_begin_write_processing): Declare.
* elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
a default definition.
(elf{32,64}_bed): Add elf_backend_begin_write_processing.
* elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
(elf_hppa_tc_make_sections): Likewise.
* elf32-hppa.c (symext_chain_built): Delete.
(symext_chain_size): Renamed from symextn_contents_real_size.
(elf32_hppa_backend_{begin,final}_write_processing): New functions.
(add_entry_to_symext_chain): New function.
(hppa_elf_set_section_contents): Ignore writes to the symbol extension
section until it's been rebuilt internally.
(hppa_elf_get_section_contents): Symbol extension section is no
longer special.
(elf_backend_{begin,final}_write_processing): Define.
(elf_hppa_tc_make_sections): Simplify now that much code has
migrated into elf32_hppa_backend_{being,final}_write_processing.
This commit is contained in:
@@ -2374,6 +2374,10 @@ NAME(bfd_elf,write_object_contents) (abfd)
|
||||
|
||||
if (abfd->output_has_begun == false)
|
||||
{
|
||||
/* Do any elf backend specific processing first. */
|
||||
if (bed->elf_backend_begin_write_processing)
|
||||
(*bed->elf_backend_begin_write_processing) (abfd);
|
||||
|
||||
if (prep_headers (abfd) == false)
|
||||
return false;
|
||||
if (elf_compute_section_file_positions (abfd) == false)
|
||||
@@ -3233,6 +3237,12 @@ elf_set_section_contents (abfd, section, location, offset, count)
|
||||
|
||||
if (abfd->output_has_begun == false) /* set by bfd.c handler? */
|
||||
{
|
||||
struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
|
||||
/* Do any elf backend specific processing first. */
|
||||
if (bed->elf_backend_begin_write_processing)
|
||||
(*bed->elf_backend_begin_write_processing) (abfd);
|
||||
|
||||
/* do setup calculations (FIXME) */
|
||||
if (prep_headers (abfd) == false)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user