[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
Wed Oct 30 13:10:10 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31653
laokz <laokz at foxmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |laokz at foxmail dot com
--- Comment #2 from laokz <laokz at foxmail dot com> ---
(In reply to Mark Wielaard from comment #1)
> I am not seeing this with gcc 13.2.0 and binutils 2.41 as used in the
> buildbot:
> https://builder.sourceware.org/buildbot/#/builders/debugedit-ubuntu-riscv
>
> What (gcc?) generates these new relocations?
>
> Could we get rid of this by grepping out the Warnings?
Sorry for the late response. The issue produced with gcc-12.3, binutils-2.41.
Surely we could get rid of it by grepping out the warnings.
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.
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
3. readelf -Wr z.o|grep 128
0000000000000015 0000001f0000003c R_RISCV_SET_ULEB128 0000000000000004
.LFE0 + 0
0000000000000015 0000001e0000003d R_RISCV_SUB_ULEB128 0000000000000000
.LFB0 + 0
4. readelf --debug-dump=info z.o
readelf: Warning: unable to apply unsupported reloc type 60 to section
.debug_rnglists
readelf: Warning: unable to apply unsupported reloc type 61 to section
.debug_rnglists
...
This might not a BUG to debugedit. But if there some information in debugedit,
it might be helpful. Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list