[PATCH] D38238: [ELF] Add constant for querying the image base in linker scripts
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:31:06 PDT 2017
jhenderson added a comment.
Another thing I just realised - setting . to Config->ImageBase could break people's links if they also explicitly set ., assuming an initial value of zero, to some value less than the default. In the following case, the data section will appear before the text section in the address space, but the two program segments will be out-of-order in an x86_64 link (according to the ELF specification, loadable segments must appear in address-order):
SECTIONS {
.text : {
*(.text .text.*)
}
. = 0x100000;
.data : {
*(.data .data.*)
}
}
https://reviews.llvm.org/D38238
More information about the llvm-commits
mailing list