This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: New x86 linker testsuite failure
> On 26 Jun 2018, at 14:43, Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Alan,
>
>>> Yeah, and the test really does want to error out as the vma/lma given
>>> for .foo isn't possible within the text segment. The patch
>>> responsible for the regression is "Use offsets instead of addresses in
>>> ELF_SECTION_IN_SEGMENT for non SHT_NOBITS". I OK'd that one thinking
>>> it was reasonable, but this fail says otherwise.
>>
>> I think the patch should be reverted for the binutils-2.31 release.
>
> Fair enough - could I ask that you do that please ? That I can be sure
> that the job is done correctly... :-)
>
Apologies, didn’t spot that test failure when I did the patch.
Looking at the test, it’s trying to create a binary of exactly the type
that my code is now allowing.
Section to segment mapping is now done via offsets instead of addresses
for PROGBITS sections, so the following is now ok:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .bar PROGBITS c0100000 001000 000001 00 AX 0 0 1
[ 2] .bss NOBITS c0100001 001001 000004 00 WA 0 0 1
[ 3] .foo PROGBITS 00000000 001005 000001 00 WA 0 0 1
[ 4] .symtab SYMTAB 00000000 001008 000040 10 5 4 4
[ 5] .strtab STRTAB 00000000 001048 000001 00 0 0 1
[ 6] .shstrtab STRTAB 00000000 001049 00002a 00 0 0 1
And the BFD code pre my patch after doing the section to segment mapping, would then
revert to using offsets anyway (ignoring the address), in order to support packed
VMAs
I would suggest then that the test is no longer valid?
Looking back at the history
https://sourceware.org/ml/binutils/2007-02/msg00375.html
https://sourceware.org/bugzilla/show_bug.cgi?id=4007
The test only existed as a check against invalid files.
Alan.