This is the mail archive of the binutils@sourceware.org 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]

objcopy --extract-symbol option keeping bogus sections/segments : wrong?


Hello again,

I am pinging again since my message might have been overlooked.

Thanks for your suggestions,

Vincent

Vincent Rubiolo wrote:
Hi gentle binutils maintainers,

I am writing to you about the newly added --extract-symbol of objcopy (cf [1]) 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 [2] 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.

Vincent

PS: attaching readelf output on VxWorks symbol files

[1] http://sourceware.org/ml/binutils/2007-03/msg00004.html
[2] http://www.sco.com/developers/gabi/latest/contents.html

-- http://twiki.wrs.com/do/view/APPdb/DefectTrackerFAQ http://twiki.wrs.com/do/view/ENGtools/MozillaAtWindriver


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