projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
966b720
)
[ELF] Simplify a condition with config->copyRelocs. NFC
author
Fangrui Song
<i@maskray.me>
Mon, 22 Nov 2021 21:59:23 +0000
(13:59 -0800)
committer
Fangrui Song
<i@maskray.me>
Mon, 22 Nov 2021 21:59:23 +0000
(13:59 -0800)
lld/ELF/InputFiles.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/InputFiles.cpp
b/lld/ELF/InputFiles.cpp
index
e8a4188
..
9399bb4
100644
(file)
--- a/
lld/ELF/InputFiles.cpp
+++ b/
lld/ELF/InputFiles.cpp
@@
-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->emit
Relocs)
+ if (!config->
copy
Relocs)
return nullptr;
InputSection *relocSec = make<InputSection>(*this, sec, name);
// If the relocated section is discarded (due to /DISCARD/ or