[all-commits] [llvm/llvm-project] a552fb: [lld-macho] Have relocation address included in ra...

Jez Ng via All-commits all-commits at lists.llvm.org
Mon Feb 28 18:57:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a552fb2a86dba5e33bd94fbcddfd5597eb49e619
      https://github.com/llvm/llvm-project/commit/a552fb2a86dba5e33bd94fbcddfd5597eb49e619
  Author: Jez Ng <jezng at fb.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    M lld/MachO/Arch/ARM64Common.cpp
    M lld/MachO/Arch/ARM64Common.h
    M lld/MachO/Arch/X86_64.cpp
    M lld/MachO/Relocations.cpp
    M lld/MachO/Relocations.h
    M lld/MachO/SyntheticSections.h
    M lld/MachO/Writer.cpp
    M lld/test/MachO/invalid/range-check.s

  Log Message:
  -----------
  [lld-macho] Have relocation address included in range-check error message

This makes it easier to debug those errors. See e.g. https://github.com/llvm/llvm-project/issues/52767#issuecomment-1028713943

We take the approach of 'reverse-engineering' the InputSection from the
output buffer offset. This provides for a cleaner Target API, and is
similar to LLD-ELF's implementation of getErrorPlace().

Reviewed By: #lld-macho, Roger

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




More information about the All-commits mailing list