[all-commits] [llvm/llvm-project] 11e8e3: [llvm-mc] - Produce R_X86_64_PLT32 relocation for ...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Mon Jan 20 00:48:53 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 11e8e324441a875f1346972384be8b5609aa10c8
      https://github.com/llvm/llvm-project/commit/11e8e324441a875f1346972384be8b5609aa10c8
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-01-20 (Mon, 20 Jan 2020)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
    M llvm/test/MC/ELF/basic-elf-64.s

  Log Message:
  -----------
  [llvm-mc] - Produce R_X86_64_PLT32 relocation for branches with JCC opcodes too.

The idea is to produce R_X86_64_PLT32 instead of
R_X86_64_PC32 for branches.

It fixes https://bugs.llvm.org/show_bug.cgi?id=44397.

This patch teaches MC to do that for JCC (jump if condition is met)
instructions. The new behavior matches modern GNU as.
It is similar to D43383, which did the same for "call/jmp foo",
but missed JCC cases.

Differential revision: https://reviews.llvm.org/D72831




More information about the All-commits mailing list