[Bug debugedit/31653] RISC-V: readelf fails to apply R_RISCV_SET/SUB_ULEB128 relocations: [debugedit 5.0] testsuite: 10 11 19 23 failed

mark at klomp dot org sourceware-bugzilla@sourceware.org
Sat Nov 2 19:03:25 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31653

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
(In reply to laokz from comment #2)
> When compiled the tests, we added -O2 option. Without -O2, all tests passed
> and no R_RISCV_SET/SUB_ULEB128 generated. It seems that gcc/binutils do
> support generating these relocs but readelf doesn't support applying them
> yet.

How exactly do you add the -O2 option?

> Reproduce steps:
> 0. platform: openSUSE Tumbleweed 20241029 - Kernel 6.11.5-1-default, riscv
> qemu vm, gcc-14.2.1, binutils-2.43.1.20240828-2
> 1. echo "int main(){}" >z.c
> 2. gcc -g -O2 z.c

plus -c

> 3. readelf -Wr z.o|grep 128                                                 

So this "reproduces" the warnings.

But I cannot replicate using the debugedit build/tests.
Is there a special way you are configuring/building and/or running make check?

If you are editing debugedit.at to explicitly add -O2 then please just don't do
that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Debugedit mailing list