PR22263 ld test, riscv fail

Alan Modra amodra@gmail.com
Fri May 26 05:26:15 GMT 2023


Hi Nelson,
On Fri, May 26, 2023 at 11:53:16AM +0800, Nelson Chu wrote:
> Hi Alan,
> 
> I just happened to be walking around here recently and sent a patch that
> tried to fix this.  Here is the patch,
> https://sourceware.org/pipermail/binutils/2023-May/127302.html.
> 
> Will this patch help pr22263?

I applied your patch and verified that it does indeed fix the fail,
even after my testsuite changes.  ;-)

>  In pr25694, I refer to what Maciej did for
> MIPS, and it seems like it won't generate the dynamic tprel reloc anymore.
> But instead, just like Andrea Schwab mentioned in the pr - riscv will still
> generate a R_RISCV_NONE reloc after applying the patch.  That is because we
> reserved the entry in the size_dynamic_section for TLS GD/IE, and the
> R_RISCV_NONE is caused by the initialization of bfd_zalloc.  Anyway, the
> patch is probably helpful since there is no TEXTREL generated for the
> pr25694, but
> for pr22263 still has a NONE reloc which is caused by the conservative
> estimate.  Maybe TLS transition, which riscv haven't supported yet, may
> clean the NONE reloc, or maybe there are some tricks supported in other
> targets for this, I am not sure which one is correct for now.

I think you'll want to look at allocate_dynrelocs for got relocs, and
adjust the condition there to match the relocate_section logic.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list