[ELF] - Linkerscript: set correct dynamic tag entries values when LS is used.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 19 Aug 2016 15:23:39 +0000 (15:23 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 19 Aug 2016 15:23:39 +0000 (15:23 +0000)
commit03e0560da77f47bdb70947efce7b8639d0f77f0d
tree95371bdf287d9b15f8d45d2f47ba2b1bd3c5af4d
parent14cdf1968f0fc5463799c234a21876f6c5434345
[ELF] - Linkerscript: set correct dynamic tag entries values when LS is used.

Previously DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ and DT_FINI_ARRAYSZ
were set to zero when lincerscript was used becase sections sizes are
calculated later that were taken.

Patch delays values calculation for these entries. Testcase is provided.

Differential revision: https://reviews.llvm.org/D23663

llvm-svn: 279258
lld/ELF/OutputSections.cpp
lld/ELF/OutputSections.h
lld/test/ELF/linkerscript/linkerscript-dynamic.s [new file with mode: 0644]