[all-commits] [llvm/llvm-project] 216b67: AArch64: diagnose out of range relocation addends ...

Tim Northover via All-commits all-commits at lists.llvm.org
Mon Jul 27 05:01:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 216b67e2023315ff30c2802c911a8ae0c7640c30
      https://github.com/llvm/llvm-project/commit/216b67e2023315ff30c2802c911a8ae0c7640c30
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
    A llvm/test/MC/AArch64/macho-addend-range.s

  Log Message:
  -----------
  AArch64: diagnose out of range relocation addends on MachO.

MachO only has 24-bit addends for most relocations, small enough that it can
overflow in semi-reasonable functions and cause insidious bugs if compiled
without assertions enabled. Switch it to an actual error instead.

The condition isn't quite identical because ld64 treats the addend as a signed
number.




More information about the All-commits mailing list