[PATCH] D78946: [llvm-objcopy][MachO] Handle relocations where r_extern is 0
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 15:07:19 PDT 2020
MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:107
+ R.Extern =
+ R.Scattered ? false : MachOObj.getPlainRelocationExternal(R.Info);
S.Relocations.push_back(R);
----------------
`!R.Scattered && MachOObj.getPlainRelocationExternal(R.Info)`
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.cpp:63
for (const RelocationInfo &R : Sec->Relocations)
- if (R.Symbol && DeadSymbols.count(R.Symbol))
+ if (R.Symbol && *(R.Symbol) && DeadSymbols.count(*(R.Symbol)))
return createStringError(std::errc::invalid_argument,
----------------
`*R.Symbol`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78946/new/
https://reviews.llvm.org/D78946
More information about the llvm-commits
mailing list