[PATCH] MIPS: support PCREL GOT access

Maciej W. Rozycki macro@orcam.me.uk
Tue Feb 6 19:47:33 GMT 2024


On Wed, 7 Feb 2024, YunQiang Su wrote:

> >  The proper way to handle such verification is to tighten the test cases.
> > Relocations have well-defined semantics, so you can prepare sources such
> > as to get reproducible output you can then match against.  That means
> > verifying exact bit patterns in files produced, and you can arrange for
> > boundary cases, such as carry/borrow or overflow, to be verified where
> > applicable too.  We have such detailed cases in our testsuite already.
> >
> 
> In fact I am worried that we use the wrong GOT slot, and the ldso
> set the GOT incorrectly for use., which is not easy to test statically.
> Bit by bit comparison is not easy, due to that the final executables
> contains something from libc, which may have quite different versions.

 You don't have to use libc at link time and using components from outside 
binutils is what makes compiled tests so problematic in our testsuite.  We 
avoid using external components where feasible.

 We can try and do our best to produce correctly linked executables and 
shared libraries and provide testsuite coverage for what we do, and then 
if you want to verify ld.so, then do it with the testsuite for the 
relevant project: glibc, uClibc, musl, whatever.

  Maciej


More information about the Binutils mailing list