[all-commits] [llvm/llvm-project] a3db4e: [lld][RISCV] Print error when encountering R_RISCV...

James Clarke via All-commits all-commits at lists.llvm.org
Fri Jan 24 10:12:34 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a3db4e05e36e836077e6e551feb6841c7e8023a0
      https://github.com/llvm/llvm-project/commit/a3db4e05e36e836077e6e551feb6841c7e8023a0
  Author: James Clarke <jrtc27 at jrtc27.com>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M lld/ELF/Arch/RISCV.cpp
    A lld/test/ELF/riscv-reloc-align.s

  Log Message:
  -----------
  [lld][RISCV] Print error when encountering R_RISCV_ALIGN

Summary:
Unlike R_RISCV_RELAX, which is a linker hint, R_RISCV_ALIGN requires the
support of the linker even when ignoring all R_RISCV_RELAX relocations.
This is because the compiler emits as many NOPs as may be required for
the requested alignment, more than may be required pre-relaxation, to
allow for the target becoming more unaligned after relaxing earlier
sequences. This means that the target is often not initially aligned in
the object files, and so the R_RISCV_ALIGN relocations cannot just be
ignored. Since we do not support linker relaxation, we must turn these
into errors.

Reviewers: ruiu, MaskRay, espindola

Reviewed By: MaskRay

Subscribers: grimar, Jim, emaste, arichardson, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71820

(cherry picked from commit d1da63664f4e42191daf2e6a9fa682ca9f75ef5e)




More information about the All-commits mailing list