From: David Miller <davem@davemloft.net>
To: ast@fb.com
Cc: daniel@iogearbox.net, netdev@vger.kernel.org
Subject: Re: BPF relocations
Date: Thu, 11 May 2017 21:19:20 -0400 (EDT) [thread overview]
Message-ID: <20170511.211920.2220259143750653022.davem@davemloft.net> (raw)
In-Reply-To: <b39b79d6-4fe2-f887-dc7e-03b62d6eb3e4@fb.com>
From: Alexei Starovoitov <ast@fb.com>
Date: Thu, 11 May 2017 16:10:35 -0700
> I don't see what we would use pc-relative relo for.
We must have them at least for banches.
Internally, we have to emit some kind of relocation as GAS makes it's
first pass over the instructions.
Afterwards, it walks the relocations and resolves all that can be done
at assembly time, and preserves as relocations in the object file for
those which it cannot.
Thinking further down the line many other kinds of PC relative
relocations are possible, even if you don't allow calls. For example:
ldimm64 R1, 24 + (. - external_label)
This would be a 64-bit PC relative reloc, with the value 24 in the
addend.
And eventually we want full linking.
The example above may seem silly, but every other full CPU ELF
specification handles these things completely and we should seek to be
complete as well.
next prev parent reply other threads:[~2017-05-12 1:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 19:31 BPF relocations David Miller
2017-05-11 23:10 ` Alexei Starovoitov
2017-05-12 1:19 ` David Miller [this message]
2017-05-12 2:17 ` Alexei Starovoitov
2017-05-21 3:22 ` Maciej W. Rozycki
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=20170511.211920.2220259143750653022.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/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