[llvm] [RISCV] Move the emitValueToAlignment before the header in emitNoteGnuPropertySection. (PR #151436)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 20:08:34 PDT 2025


MaskRay wrote:

> the the header so we should align the header to avoid a gap.

The section alignment (in ELF, sh_addralign) is the maximum value of all alignment directives in the section. Moving emitValueToAlignment from one place to another does not change the section alignment. There will not be a gap during linking.
That said, it's odd not to insert an alignment at the section beginning.

https://github.com/llvm/llvm-project/pull/151436


More information about the llvm-commits mailing list