[llvm] Reland "[ObjectYAML][ELF] Take alignment into account when generating notes" (PR #118434)
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 07:44:18 PST 2024
================
@@ -1810,7 +1810,7 @@ void ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader,
break;
default:
reportError(Section.Name + ": invalid alignment for a note section: 0x" +
- Twine::utohexstr(SHeader.sh_addralign));
+ Twine::utohexstr(Section.AddressAlign));
----------------
igorkudrin wrote:
I don't think a test can check this because `Sec->AddressAlign` is assigned to `SHeader.sh_addralign` in `ELFState<ELFT>::initSectionHeaders()` just a few lines before `writeSectionContent()` is called.
https://github.com/llvm/llvm-project/pull/118434
More information about the llvm-commits
mailing list