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]

Re: objcopy --strip-debug breaks GROUP sections


Alan Modra <amodra@gmail.com> writes:

> On Tue, Feb 16, 2010 at 06:25:58PM +0100, Eirik Byrkjeflot Anonsen wrote:
>> Eirik Byrkjeflot Anonsen <eirik@opera.com> writes:
>> 
>> > Using binutils 2.20, I find that running objcopy --strip-debug generates
>> > "invalid" GROUP sections.  ("invalid" in the sense that ar complains and
>> > the linker fails...  I haven't checked any specifications.)
>> >
>> >
>> > It seems that what happens is that when sections are removed from the
>> > object file, any references to that section within GROUP sections are
>> > set to 0.
>> 
>> Changing bfd_elf_set_group_contents() to shrink sh_size and skip the
>> sections that will not be output seems to solve the problem.  Does
>> anyone think that this is something I should try to clean up and submit
>> a patch for?  Or am I doing something completely wrong?
>
> I have a fix that I'm testing.

Great!  Do you want me to test if it solves my problem?

eirik


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