Bug 1217108 - binutils strip fails to run on BPF object file with "unsupported relocation type 0x4"
Summary: binutils strip fails to run on BPF object file with "unsupported relocation t...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (show other bugs)
Version: Current
Hardware: i586 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Matz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-14 08:03 UTC by Shung-Hsi Yu
Modified: 2023-11-15 05:25 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shung-Hsi Yu 2023-11-14 08:03:13 UTC
strip has problem working with Clang-produced BPF object files due to the presence of R_BPF_64_NODLYD32. This leads to build failure on OBS for xdp-tool due to the error seen below:

> strip: BFD (GNU Binutils; openSUSE Tumbleweed) 2.41.0.20230908-1 assertion fail ../../bfd/elf64-bpf.c:67
> strip: /home/abuild/rpmbuild/BUILDROOT/xdp-tools-1.4.1-33.1.i386/usr/lib/bpf/xdp-dispatcher.o: unsupported relocation type 0x4
> strip: /home/abuild/rpmbuild/BUILDROOT/xdp-tools-1.4.1-33.1.i386/usr/lib/bpf/xdp-dispatcher.o: bad value
> strip: BFD (GNU Binutils; openSUSE Tumbleweed) 2.41.0.20230908-1 assertion fail ../../bfd/elf64-bpf.c:67
> strip: /home/abuild/rpmbuild/BUILDROOT/xdp-tools-1.4.1-33.1.i386/usr/lib/bpf/xsk_def_xdp_prog.o: unsupported relocation type 0x4
> strip: /home/abuild/rpmbuild/BUILDROOT/xdp-tools-1.4.1-33.1.i386/usr/lib/bpf/xsk_def_xdp_prog.o: bad value
> ...
> RPM build errors:
>     Installed (but unpackaged) file(s) found:
>    /usr/lib/bpf/stBq4INM
>    /usr/lib/bpf/stFcDxN4

there is a proposed workaround at https://sourceware.org/pipermail/binutils/2023-October/130195.html, if we can have that applied to binutils package it will avoiding having to build with `NO_BRP_STRIP_DEBUG=1`.
Comment 1 OBSbugzilla Bot 2023-11-15 04:15:03 UTC
This is an autogenerated message for OBS integration:
This bug (1217108) was mentioned in
https://build.opensuse.org/request/show/1126510 Factory / xdp-tools
Comment 2 OBSbugzilla Bot 2023-11-15 05:25:03 UTC
This is an autogenerated message for OBS integration:
This bug (1217108) was mentioned in
https://build.opensuse.org/request/show/1126513 Factory / xdp-tools