[PATCH] D19663: [ELF] - Basic support of linkerscript commands: DATA_SEGMENT_ALIGN, DATA_SEGMENT_END, CONSTANT
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 08:18:01 PDT 2016
grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
It is called basic because:
1) CONSTANT expression can refer to COMMONPAGESIZE and MAXPAGESIZE.
This sizes are usually different and used for possible optimization of
memory consumption.
More details are here: https://sourceware.org/ml/binutils/2002-02/msg00265.html
We currently do not support this optimization, so both CONSTANT(MAXPAGESIZE)
and CONSTANT(COMMONPAGESIZE) just return Target->PageSize value.
2) DATA_SEGMENT_ALIGN and DATA_SEGMENT_END are used as a part of opt.
The latter one is just ignored now.
According to documentation DATA_SEGMENT_ALIGN has 2 possible
calculation, but since we do not support mentioned opt - it
is always calculated now as (ALIGN(MAXPAGESIZE) + (. & (MAXPAGESIZE - 1))).
In general this should work for now until we deside to support this opt.
http://reviews.llvm.org/D19663
Files:
ELF/LinkerScript.cpp
test/ELF/linkerscript-locationcounter.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19663.55420.patch
Type: text/x-patch
Size: 4636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160428/dff73050/attachment.bin>
More information about the llvm-commits
mailing list