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: [PATCH v2] Add support for O32 FPXX ABI


Richard Sandiford <rdsandiford@googlemail.com> writes:
> Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> > On the topic of the testsuites (in particular the linker). Do you have
> > any strong feelings as to whether I should always just update the
> > expected output if affected by the introduction of .gnu.attributes,
> > .MIPS.abiflags or the PT_MIPS_ABIFLAGS header? The alternative (for some
> > tests) is to modify the link script to just discard .gnu.attributes and
> > .MIPS.abiflags.
> >
> > I'd like to do a bit of both personally. The program header and
> > .MIPS.abiflags section will be checked at least once for each ABI though
> > of course.
> 
> Yeah, good question...  When doing linker tests, I've tried to make
> the linker script fairly tolerant against this kind of thing, e.g. with:
> 
> SECTIONS
> {
>   . = 0x40000 + SIZEOF_HEADERS;
>   .interp : { *(.interp) }
> 
>   . = 0x41000;
>   .reginfo : { *(.reginfo) }
>   .hash : { *(.hash) }
>   .dynsym : { *(.dynsym) }
>   .dynstr : { *(.dynstr) }
> 
>   . = 0x42000;
>   .dynamic : { *(.dynamic) }
> 
>   . = 0x43000;
>   .rel.dyn : { *(.rel.dyn) }
>   .rel.plt : { *(.rel.plt) }
>   .plt : { *(.plt) }
> 
>   . = 0x44000;
>   .text : { *(.text) }
>   .MIPS.stubs : { *(.MIPS.stubs) }
>   .MIPS.options : { *(.MIPS.options) }
> 
>   . = 0x80000;
>   .rld_map : { *(.rld_map) }
> 
>   . = 0x81000;
>   .got.plt : { *(.got.plt) }
> 
>   . = 0xa0000;
>   HIDDEN (_gp = . + 0x7ff0);
>   .got : { *(.got) }
> 
>   . = 0xa1000;
>   .data : { *(.data) }
> 
>   . = 0xa2000;
>   .bss : { *(.dynbss) }
> }
> 
> But I suppose even that isn't going to help for something that goes
> immediately after the headers.
> 
> So yeah, discarding .MIPS.abiflags where easiest is fine with me.
> Not sure about .gnu_attributes though.  I thought that would never
> become loadable under the new scheme.

It won't become loadable but will now be present in all (99.9% of)
links and therefore affects the *.gd files that compare the private
data. I'm not as concerned about updating those reference files to
have the gnu attribute in them but I'd like to take a look at the
overall change to the testsuite to see whether it is generally simpler
to discard the section and not have it in the reference output for
non-fpabi related tests.

I expect I should have at least one assembler test for each ISA
extension, one for each ASE and a couple of combinations of ASEs. Is
that overkill, about right or too little? For link tests relating to
ABI flags then some basic coverage of the flag merging code seem
reasonable and also at least one that strips the .MIPS.abiflags
section before linking to trigger the ABI flags inferring code (that
one is somewhat custom and may take some beating into the testsuite).

I've already written coverage tests for the merging of 'fpabi' fields
but the rest are still to do.

Regards,
Matthew


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