forked from OSchip/llvm-project
[BOLT] Do not process DWARF relocs
Summary: Use the new API introduced in https://reviews.llvm.org/D106624 to request LLVM do not process relocations for debug sections, since BOLT processes final binaries that are already relocated. (cherry picked from FBD31449206)
This commit is contained in:
parent
8ef3b27834
commit
a8cbc8093f
|
@ -883,7 +883,7 @@ std::unique_ptr<BinaryContext>
|
||||||
createDwarfOnlyBC(const object::ObjectFile &File) {
|
createDwarfOnlyBC(const object::ObjectFile &File) {
|
||||||
return BinaryContext::createBinaryContext(
|
return BinaryContext::createBinaryContext(
|
||||||
&File, false,
|
&File, false,
|
||||||
DWARFContext::create(File, DWARFContext::ProcessDebugRelocations::Process,
|
DWARFContext::create(File, DWARFContext::ProcessDebugRelocations::Ignore,
|
||||||
nullptr, "", WithColor::defaultErrorHandler,
|
nullptr, "", WithColor::defaultErrorHandler,
|
||||||
WithColor::defaultWarningHandler));
|
WithColor::defaultWarningHandler));
|
||||||
}
|
}
|
||||||
|
|
|
@ -494,10 +494,10 @@ RewriteInstance::RewriteInstance(ELFObjectFileBase *File, const int Argc,
|
||||||
|
|
||||||
BC = BinaryContext::createBinaryContext(
|
BC = BinaryContext::createBinaryContext(
|
||||||
File, IsPIC,
|
File, IsPIC,
|
||||||
DWARFContext::create(
|
DWARFContext::create(*File, DWARFContext::ProcessDebugRelocations::Ignore,
|
||||||
*File, DWARFContext::ProcessDebugRelocations::Process, nullptr,
|
nullptr, opts::DWPPathName,
|
||||||
opts::DWPPathName, WithColor::defaultErrorHandler,
|
WithColor::defaultErrorHandler,
|
||||||
WithColor::defaultWarningHandler));
|
WithColor::defaultWarningHandler));
|
||||||
|
|
||||||
BAT = std::make_unique<BoltAddressTranslation>(*BC);
|
BAT = std::make_unique<BoltAddressTranslation>(*BC);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue