[PATCH v2 6/8] RISC-V: Rewrite the IFUNC testcases.
Maciej W. Rozycki
macro@wdc.com
Fri Aug 21 12:02:38 GMT 2020
On Mon, 10 Aug 2020, Fangrui Song wrote:
> >diff --git a/ld/testsuite/ld-riscv-elf/ifunc-nonplt-exe.rd b/ld/testsuite/ld-riscv-elf/ifunc-nonplt-exe.rd
> >new file mode 100644
> >index 0000000..0de47a4
> >--- /dev/null
> >+++ b/ld/testsuite/ld-riscv-elf/ifunc-nonplt-exe.rd
> >@@ -0,0 +1,4 @@
> >+Relocation section '.rela.plt' at .*
> >+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
> >+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_IRELATIVE[ ]+[0-9a-f]*
> >+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_IRELATIVE[ ]+[0-9a-f]*
>
> I do always see such over generic tests in binutils, which do not test the exact
> addresses ([0-9a-f]*). So, if somewhere made an offset error, the tests could
> not detect such errors at all. I wonder whether the tests can be made more
> specific.
It depends on the specific test really and what it is supposed to cover.
Sometimes matching against exact section offsets or virtual addresses
makes sense and sometimes the opposite does.
Maciej
More information about the Binutils
mailing list