This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFC] elf section building
- From: Elias Athanasopoulos <eathan at otenet dot gr>
- To: binutils at sources dot redhat dot com
- Date: Tue, 22 Oct 2002 13:32:23 +0300
- Subject: [RFC] elf section building
Hi,
In bfd_section_from_shdr() (elf.c) the sections of an elf are parsed. There
is code like:
case SHT_SYMTAB: /* A symbol table */
if (elf_onesymtab (abfd) == shindex)
return true;
What's the purpose of this check? Wouldn't be better to return a call to
_bfd_elf_make_section_from_shdr()? This way objdump will not miss some
sections when it is invoked with the -h switch.
I have a scenario where objdump misses .shstrtab, .symtab and .strtab,
whilst readelf prints all sections. I have a patch that replaces some
plain 'true' returns with calls to _bfd_elf_make_section_from_shdr(), but
I want to verify that this is the right direction to procceed.
Elias