public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Yonghong Song <yhs@fb.com>
Cc: elfutils-devel@sourceware.org, ast@fb.com, kafai@fb.com
Subject: Re: [PATCH v2] backends,bpf: add proper relocation support
Date: Thu, 21 Jun 2018 18:58:00 -0000	[thread overview]
Message-ID: <20180621185852.GB30961@wildebeest.org> (raw)
In-Reply-To: <6ea2640a-fd92-82b9-0041-0d74bfff17c3@fb.com>

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

  reply	other threads:[~2018-06-21 18:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16 20:02 Yonghong Song
2018-06-20 11:41 ` Mark Wielaard
2018-06-20 14:18   ` Yonghong Song
2018-06-21 18:58     ` Mark Wielaard [this message]
2018-06-21 20:24       ` Yonghong Song
2018-06-22  6:38         ` Mark Wielaard
2018-06-22 14:15           ` Yonghong Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180621185852.GB30961@wildebeest.org \
    --to=mark@klomp.org \
    --cc=ast@fb.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=kafai@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).