[Bug debugedit/31653] RISC-V: readelf fails to apply R_RISCV_SET/SUB_ULEB128 relocations: [debugedit 5.0] testsuite: 10 11 19 23 failed
laokz at foxmail dot com
sourceware-bugzilla@sourceware.org
Sun Nov 3 03:01:06 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31653
--- Comment #4 from laokz <laokz at foxmail dot com> ---
(In reply to Mark Wielaard from comment #3)
> (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?
>
We work for openEuler Linux. It uses gcc_secure[1], which is a wrapper of gcc,
to optimize and enhance security. Gcc_secure added 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
>
Oops
> > 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.
No.
We could avoid the problem by adding debugedit to gcc_secure exclusive list, or
by other means. Thanks for your reply.
[1] https://gitee.com/src-openeuler/gcc_secure
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list