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: RFC: section merge test (ld-elf)


Hi Sivanupandi,

> Test flags1.s expects output (after objcopy) have one program header. But
> sections are merged to a segment while linking itself (same for native
> as well). Is that expected from this testcase?
> Is that testcase intended to check merge of sections after objcopy with
> updated flags?

Yes and no.  The purpose of the test is to check that the flags have 
been changed for the .post_text_reserve section.  It does this however,
in a rather roundabout way by checking to see if the .text section and
the .post_text_reserve_section have been combined into a single program
segment.  (They were in separate segments before the objcopy because
they had incompatible flags.  They can be merged into the same segment
after the objcopy because their flags are not compatible.  This merging
does not have to happen though, it is only an optimization that the
linker is free to ignore).

If you want to remove the XFAIL for the AVR for this test, then that would
be fine with me.  If you feel like more of a challenge, then rewriting 
this test so that it passes "-S --wide" to readelf, instead of "-l --wide",
and then checks the section flags, would be a great way to improve the 
test and make it work with a wider range of targets.

Cheers
  Nick




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