summaryrefslogtreecommitdiffstats
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-05-28 13:24:33 +0000
committerNick Clifton <nickc@redhat.com>1999-05-28 13:24:33 +0000
commite6c51ed4dfc35cad59f92b1e364511385858401a (patch)
tree3240776f91249a08e427368fddd74ebe0f11e004 /bfd/elf.c
parent229cf42b3388829e250cfab927fbb116e6d946ae (diff)
downloadppe42-binutils-e6c51ed4dfc35cad59f92b1e364511385858401a.tar.gz
ppe42-binutils-e6c51ed4dfc35cad59f92b1e364511385858401a.zip
Initialise EI_OSABI and EI_ABIVERSION fields of e_ident array.
Add ability for backends to process program and section headers after they have been created.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 36a4b6bd1e..135e55392a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2011,6 +2011,10 @@ _bfd_elf_compute_section_file_positions (abfd, link_info)
if (! prep_headers (abfd))
return false;
+ /* Post process the headers if necessary. */
+ if (bed->elf_backend_post_process_headers)
+ (*bed->elf_backend_post_process_headers) (abfd, link_info);
+
failed = false;
bfd_map_over_sections (abfd, elf_fake_sections, &failed);
if (failed)
@@ -3042,6 +3046,9 @@ prep_headers (abfd)
bfd_big_endian (abfd) ? ELFDATA2MSB : ELFDATA2LSB;
i_ehdrp->e_ident[EI_VERSION] = bed->s->ev_current;
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_SYSV;
+ i_ehdrp->e_ident[EI_ABIVERSION] = 0;
+
for (count = EI_PAD; count < EI_NIDENT; count++)
i_ehdrp->e_ident[count] = 0;
OpenPOWER on IntegriCloud