On Wed, Jun 20, 2018 at 07:18:22AM -0700, Yonghong Song wrote: > On 6/20/18 4:41 AM, Mark Wielaard wrote: > > The patch looks perfect. And the new testcase is good. I used the > > testfile to quickly test eu-readelf --debug-dump also got the > > relocations right, and it did of course. > > > > Just waiting for the glibc elf.h update/sync and then I'll push this to > > master. > > This looks perfect. Thanks!
Pushed both. Thanks for the patch and testcase. BTW. The following now also just works in case you have tools that cannot handle the BPF relocations, but can handle separate .debug files: eu-strip --reloc-debug-sections -f testfile-bpf-reloc.o.debug \ testfile-bpf-reloc.o That puts the debuginfo with all (simple) relocations resolved into the .debug file. --reloc-debug-sections Resolve all trivial relocations between debug sections if the removed sections are placed in a debug file (only relevant for ET_REL files, operation is not reversable, needs -f) This is used by some distros for the kernel .ko modules (which are also ET_REL files) to safe space. But also might be applicable to these BPF elf files in case they are packaged. Cheers, Mark