[ELF] - Basic support of linkerscript commands: DATA_SEGMENT_ALIGN, DATA_SEGMENT_END, CONSTANT
It is called basic because: 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. 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. Differential revision: https://reviews.llvm.org/D19663 llvm-svn: 276323
Loading
Please register or sign in to comment