MaskRay wrote:

I realized that the section-affecting behavior is unusual.

The current behavior is only useful when each function has its own section 
(`-ffunction-sections`), so that section size equals function size and 
`sh_addralign` effectively encodes per-function alignment. With a merged 
`.text` section the total size is always large, so `sh_addralign` ends up at 
`N` regardless. Moreover, `sh_addralign` only controls where the linker places 
the section start; alignment between individual functions within a merged 
section comes from `.p2align` NOP padding embedded in the section body, which 
`.prefalign` does not affect.

Proposed revision: https://github.com/llvm/llvm-project/pull/184032

GAS feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=33943

https://github.com/llvm/llvm-project/pull/150151
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to