[llvm] Reland "[ObjectYAML][ELF] Take alignment into account when generating notes" (PR #118434)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 01:29:13 PST 2024
================
@@ -1799,6 +1799,21 @@ void ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader,
if (!Section.Notes)
return;
+ unsigned Align;
+ switch (SHeader.sh_addralign) {
----------------
jh7370 wrote:
Does using this work if `ShAddrAlign` is specified in the YAML to a value other than 0/4/8? I wasn't sure the order this was applied to the Elf_Shdr struct, in relation to this code. That field shouldn't have any functional impact on how the ELF is written, except to modify the value written in the section header (only `AddressAlign` should impact the way the section is written).
https://github.com/llvm/llvm-project/pull/118434
More information about the llvm-commits
mailing list