[lld] ELF: Introduce --shuffle-padding flag. (PR #117653)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 05:23:29 PST 2024
================
@@ -2753,6 +2753,21 @@ RelroPaddingSection::RelroPaddingSection(Ctx &ctx)
: SyntheticSection(ctx, ".relro_padding", SHT_NOBITS, SHF_ALLOC | SHF_WRITE,
1) {}
+ShufflePaddingSection::ShufflePaddingSection(Ctx &ctx, uint64_t size,
+ OutputSection *parent)
+ : SyntheticSection(ctx, ".shuffle_padding", SHF_ALLOC, SHT_PROGBITS, 1),
----------------
smithp35 wrote:
Do these flags behave themselves in the case of .bss and .data?
I'd expect if there is at least one other .data section the combined OutputSection flags would be SHF_WRITE. Could be interesting if there's no existing .data, although I expect there won't be any of these section inserted in that case.
Would the SHT_PROGBITs padding sections in .bss result in the combined .bss Output Section being output as SHT_PROGBITS? This might not be ideal if benchmarking program startup, although shouldn't make a difference to the program runtime.
https://github.com/llvm/llvm-project/pull/117653
More information about the llvm-commits
mailing list