[lld-macho] Include address offsets in error messages
authorJez Ng <jezng@fb.com>
Tue, 8 Feb 2022 02:06:02 +0000 (21:06 -0500)
committerJez Ng <jezng@fb.com>
Tue, 8 Feb 2022 02:06:18 +0000 (21:06 -0500)
commit06f863ac5eb5d1749d70c4870669abd9719b1696
treef3d1ade2e0e30c6ca1a760804ef584da768a3a85
parentbbc748996f0aa5c8e080e08d6ffbc35a7a587d30
[lld-macho] Include address offsets in error messages

This makes it easier to pinpoint the source of the problem.

TODO: Have more relocation error messages make use of this
functionality.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D118798
lld/MachO/InputFiles.cpp
lld/MachO/InputSection.cpp
lld/MachO/InputSection.h
lld/MachO/Relocations.cpp
lld/MachO/UnwindInfoSection.cpp
lld/test/MachO/invalid/bad-got-to-dylib-tlv-reference.s
lld/test/MachO/invalid/bad-got-to-tlv-reference.s
lld/test/MachO/invalid/bad-tlv-relocation.s
lld/test/MachO/invalid/compact-unwind-bad-reloc.s
lld/test/MachO/invalid/cstring-dedup.s