Skip to content

Commit 910204c

Browse files
committed
[ELF] createSyntheticSections: simplify config->relocatable. NFC
We can add .riscv.attributes synthetic section here in the future.
1 parent d2cf0bd commit 910204c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lld/ELF/Writer.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,12 @@ template <class ELFT> void elf::createSyntheticSections() {
398398
}
399399
part.ehFrame = std::make_unique<EhFrameSection>();
400400
add(*part.ehFrame);
401-
}
402401

403-
if (config->emachine == EM_ARM && !config->relocatable) {
404-
// The ARMExidxsyntheticsection replaces all the individual .ARM.exidx
405-
// InputSections.
406-
part.armExidx = std::make_unique<ARMExidxSyntheticSection>();
407-
add(*part.armExidx);
402+
if (config->emachine == EM_ARM) {
403+
// This section replaces all the individual .ARM.exidx InputSections.
404+
part.armExidx = std::make_unique<ARMExidxSyntheticSection>();
405+
add(*part.armExidx);
406+
}
408407
}
409408

410409
if (!config->packageMetadata.empty()) {

0 commit comments

Comments
 (0)