objcopy --extract-symbol option keeping bogus sections/segments : wrong?
Mon Jul 16 17:10:00 GMT 2007
I am pinging again since my message might have been overlooked.
Thanks for your suggestions,
Vincent Rubiolo wrote:
> Hi gentle binutils maintainers,
> I am writing to you about the newly added --extract-symbol of objcopy
> (cf ) which, as Richard explained, we use to extract symbol files
> from VxWorks kernels.
> My concern is about the fact that the option zeroes out the
> addresses/sizes, etc of the sections and segments in the file _instead_
> of only keeping the relevant bits in. In some circumstances, this
> confuses our kernel loader (which is used to load that stripped file)
> since the segments within the file are marked as loadable but are of
> empty size/address.
> I have looked at the ELF spec  and while the standard says the image
> can have supplementary segments/sections, it does not specify whether
> they can be empty/marked PT_LOAD.
> To me, there is no reason to have these bogus sections/segments in the
> image and they should be removed. I think we should fix the file and not
> the loader itself.
> Is this a correct reasoning?
> Thanks for your insight.
> PS: attaching readelf output on VxWorks symbol files
>  http://sourceware.org/ml/binutils/2007-03/msg00004.html
>  http://www.sco.com/developers/gabi/latest/contents.html
More information about the Binutils