This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: objdump: Skip linker created section
On Tue, Apr 19, 2005 at 11:15:29AM -0700, James E Wilson wrote:
> 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.
I believe that a SEC_LINKER_CREATED section never exists in the input
file. Otherwise, it is a bug.
H.J.