public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Sriraman Tallam <tmsriram@google.com>
Cc: Rahul Chaudhry via gnu-gabi <gnu-gabi@sourceware.org>,
	Han Shen <shenhan@google.com>,
		Rahman Lavaee <rahmanl@google.com>, Rui Ueyama <ruiu@google.com>,
		Eli Friedman <efriedma@quicinc.com>,
	Krzysztof Pszeniczny <kpszeniczny@google.com>,
		Xinliang David Li <davidxl@google.com>,
	Cary Coutant <ccoutant@gmail.com>
Subject: Re: Request for a new relaxed relocation type for Basic Block Section jumps
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <CAMe9rOqPnj=D+oQ82ZQJ4=g83Sx1nFpxJx=Lqvjz3kL76H7j5A@mail.gmail.com> (raw)
In-Reply-To: <CAAs8HmwoN9_SvVWp9XRgG6_hpmx5nM5X8i7NSYNrsgKfrrb4jQ@mail.gmail.com>

On Wed, Nov 6, 2019 at 9:56 AM Sriraman Tallam <tmsriram@google.com> wrote:
>
> Hello H.J.,
>
>     We are looking at supporting Basic Block Sections in the compiler (LLVM for now) similar to function and data sections, please see our RFC here: http://lists.llvm.org/pipermail/llvm-dev/2019-September/135393.html  In order to support basic block sections, the compiler needs to generate unconditional branches between basic blocks that would otherwise be a fall through.  Further, all inter-basic block branches have to use relocations to allow the linker to arbitrarily reorder basic blocks.
>
>    We relax these branches in the linker by eliminating fall throughs after reordering the basic blocks.  Using a separate relocation type for such relocations would make it really easy to identify and relax these branches. We are doing this by inspecting the opcode bytes of the relocation to check if it is a branch and this is potentially prone to errors. How do we go about adding a new relocation type for this?
>

So you need a new PC relative 32-bit signed relocation for jmp.  Is
this correct?
Can it be simply treated as R_X86_64_PC32 and work correctly?  Can it
be used with
jcc and call?

-- 
H.J.

           reply	other threads:[~2019-11-06 18:37 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAAs8HmwoN9_SvVWp9XRgG6_hpmx5nM5X8i7NSYNrsgKfrrb4jQ@mail.gmail.com>]

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='CAMe9rOqPnj=D+oQ82ZQJ4=g83Sx1nFpxJx=Lqvjz3kL76H7j5A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=ccoutant@gmail.com \
    --cc=davidxl@google.com \
    --cc=efriedma@quicinc.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=kpszeniczny@google.com \
    --cc=rahmanl@google.com \
    --cc=ruiu@google.com \
    --cc=shenhan@google.com \
    --cc=tmsriram@google.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).