PATCH: objdump: Skip linker created section

James E Wilson wilson@specifixinc.com
Tue Apr 19 18:15:00 GMT 2005


On Sun, 2005-04-17 at 07:37, H. J. Lu wrote:
> Should objdump skip
> linker created section? Readelf doesn't display it.

readelf does not display the section because it doesn't exist in the
object file.  Objdump displays the section because we create it always
when bfd initializes, even if not linking.  readelf is correct here. 
Objdump shouldn't be claiming the section exists.

Perhaps there is a linker hook we can use instead of the elf_object_p
hook?  That would fix objdump.

Alternatively, if it is always the case that a section with
SEC_LINKER_CREATED is not in the object file, then your objdump.c patch
looks OK to me.  This does appear to be the case, as there is no section
header flag for SEC_LINKER_CREATED, so I think this can only happen for
your fake section group.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com




More information about the Binutils mailing list