diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-04-12 03:30:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-04-12 03:30:56 +0000 |
commit | b436e86197cea3005a41b1d36dd3969089a9cb1e (patch) | |
tree | dde4fb9a08ec19f1d7cd44931ad0b0b055ee982a /bfd | |
parent | 041a175c103a160fab9c49780d9c5596396141eb (diff) | |
download | gdb-b436e86197cea3005a41b1d36dd3969089a9cb1e.tar.gz |
* elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
header pad.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4fa7f2211c9..f7c9ad9a8c8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-04-12 Alan Modra <amodra@bigpond.net.au> + + * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or + header pad. + 2002-04-09 DJ Delorie <dj@redhat.com> * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks. diff --git a/bfd/elf.c b/bfd/elf.c index 379eb088d15..f8fdbd2a9fd 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3881,7 +3881,6 @@ prep_headers (abfd) Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */ Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */ - int count; struct elf_strtab_hash *shstrtab; struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -3904,12 +3903,6 @@ 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_NONE; - i_ehdrp->e_ident[EI_ABIVERSION] = 0; - - for (count = EI_PAD; count < EI_NIDENT; count++) - i_ehdrp->e_ident[count] = 0; - if ((abfd->flags & DYNAMIC) != 0) i_ehdrp->e_type = ET_DYN; else if ((abfd->flags & EXEC_P) != 0) |