[PATCH 1/2] MIPS: Add n32 VECs to non-vendor elf targets

Maciej W. Rozycki macro@orcam.me.uk
Tue Jun 6 16:57:45 GMT 2023


On Tue, 6 Jun 2023, YunQiang Su wrote:

> > > diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d
> > > index 513589e73d3..f7d9a4e57c0 100644
> > > --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d
> > > +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d
> > > @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries:
> > >   Offset     Info    Type            Sym\.Value  Sym\. Name
> > >  00000000  ......05 R_MIPS_HI16       00000000   _gp_disp
> > >  00000004  ......06 R_MIPS_LO16       00000000   _gp_disp
> > > -0000000c  0000070a R_MIPS_PC16       00000020   \.L1\^B1
> > > +0000000c  00000[7d]0a R_MIPS_PC16       00000020   \.L1\^B1
> > >  00000014  ......09 R_MIPS_GOT16      00000000   foo
> > >  00000024  ......09 R_MIPS_GOT16      00000000   foo
> > >  0000001c  ......06 R_MIPS_LO16       00000000   foo
> > > -00000020  0000080a R_MIPS_PC16       00000018   \.L0\^B1
> > > +00000020  00000[8e]0a R_MIPS_PC16       00000018   \.L0\^B1
> > >  #pass
> >
> >  Where do these differences come from?
> 
> It looks like that the order of symbols is different.

 Right, the IRIX psABI wants symbols to be sorted according to a different 
rule; this is probably the most prominent divergence between the two MIPS 
psABIs.  It did not occur to me it is the symbol indices that are involved 
here.

 The difference in symbol indices would have best been mentioned in the 
change description: these descriptions are meant to make it easier to the 
reviewer to understand the change and to convince them that the change is 
indeed correct.

 And the easier a review is the quicker you will get it.  If it takes a 
minute and just reading through the submission to decide that a change is 
correct, then you you will get your change reviewed quickly.  If one has 
to wade through sources to collect bits of information so as to understand 
what the change is really about, then the likelihood of a fast review goes 
down very quickly.

 Good coding style also helps as one doesn't get distracted by mechanical 
clean-ups.

> I will edit comdat-reloc-r6.d, use `.' for the SYM index section in r_info,
> just like other symbols.

 It is the correct approach given how the original test has been written. 
It is also a fix to a recent addition, which just shows why getting things 
properly reviewed is so important.

  Maciej


More information about the Binutils mailing list