[ELF] Simplify a condition with config->copyRelocs. NFC

This commit is contained in:
Fangrui Song 2021-11-22 13:59:23 -08:00
parent 966b720983
commit 7aafe467d2

View File

@ -966,7 +966,7 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(uint32_t idx,
// `nullptr` for the normal case. However, if -r or --emit-relocs is
// specified, we need to copy them to the output. (Some post link analysis
// tools specify --emit-relocs to obtain the information.)
if (!config->relocatable && !config->emitRelocs)
if (!config->copyRelocs)
return nullptr;
InputSection *relocSec = make<InputSection>(*this, sec, name);
// If the relocated section is discarded (due to /DISCARD/ or