This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]