public inbox for
 help / color / mirror / Atom feed
* Re: Request for a new relaxed relocation type for Basic Block Section jumps
       [not found] <>
@ 2019-01-01  0:00 ` H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Sriraman Tallam
  Cc: Rahul Chaudhry via gnu-gabi, Han Shen, Rahman Lavaee, Rui Ueyama,
	Eli Friedman, Krzysztof Pszeniczny, Xinliang David Li,
	Cary Coutant

On Wed, Nov 6, 2019 at 9:56 AM Sriraman Tallam <> 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:  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?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-06 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2019-01-01  0:00 ` Request for a new relaxed relocation type for Basic Block Section jumps H.J. Lu

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).