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) {
|
||||
return BinaryContext::createBinaryContext(
|
||||
&File, false,
|
||||
DWARFContext::create(File, DWARFContext::ProcessDebugRelocations::Process,
|
||||
DWARFContext::create(File, DWARFContext::ProcessDebugRelocations::Ignore,
|
||||
nullptr, "", WithColor::defaultErrorHandler,
|
||||
WithColor::defaultWarningHandler));
|
||||
}
|
||||
|
|
|
@ -494,10 +494,10 @@ RewriteInstance::RewriteInstance(ELFObjectFileBase *File, const int Argc,
|
|||
|
||||
BC = BinaryContext::createBinaryContext(
|
||||
File, IsPIC,
|
||||
DWARFContext::create(
|
||||
*File, DWARFContext::ProcessDebugRelocations::Process, nullptr,
|
||||
opts::DWPPathName, WithColor::defaultErrorHandler,
|
||||
WithColor::defaultWarningHandler));
|
||||
DWARFContext::create(*File, DWARFContext::ProcessDebugRelocations::Ignore,
|
||||
nullptr, opts::DWPPathName,
|
||||
WithColor::defaultErrorHandler,
|
||||
WithColor::defaultWarningHandler));
|
||||
|
||||
BAT = std::make_unique<BoltAddressTranslation>(*BC);
|
||||
|
||||
|
|
Loading…
Reference in New Issue