[PATCH] D75724: [ELF] Simplify sh_addr computation and warn if sh_addr is not a multiple of sh_addralign
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 11:35:51 PST 2020
MaskRay added a comment.
In D75724#1909965 <https://reviews.llvm.org/D75724#1909965>, @psmith wrote:
> In theory I don't mind that we deviate from GNU ld where it makes sense, however given that our Linker Script documentation is the GNU ld docs, and that has considerable gaps, I'd be much more comfortable in approving if we had more user facing documentation where we document the differences. I know that this has come up before but we didn't take any action. Is it worth starting now, even if we only document this one difference and add to it over time? This could either be in our existing man page and/or in the official LLVM docs.
Yeah we need a documentation.
I made these alignment changes because of https://reviews.llvm.org/D74286#1872329 . An alternative is to let `ALIGN` override max_input_align. What do you think of it? The good thing is that we can let VMA/LMA use the same logic.
With this patch, we will probably eventually do:
- VMA: max(ALIGN, max_input_align)
- LMA: ALIGN
I have difficult to understand Alan Modra's words:
- ALIGN is bad
- addr_tree+ALIGN is bad.
If ALIGN is bad, we can do:
- VMA: ALIGN. Optionally emit a warning if ALIGN is smaller than max_input_align.
- LMA: ALIGN
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75724/new/
https://reviews.llvm.org/D75724
More information about the llvm-commits
mailing list