[PATCH] D23663: [ELF] - Linkerscript: set correct synamic tag entries values when LS is used.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 08:54:41 PDT 2016
grimar added inline comments.
================
Comment at: ELF/OutputSections.cpp:755
@@ +754,3 @@
+template <class ELFT> static uint64_t getValueForTag(int32_t Tag) {
+ if (Tag == DT_PREINIT_ARRAYSZ)
+ return Out<ELFT>::PreinitArray->getSize();
----------------
evgeny777 wrote:
> Can we use OutSec field from Entry?
>
> ```
> case Entry::SecSize:
> P->d_un.d_val = E.OutSec->getSize();
> break;
> ```
OutSec field is not set, see:
```
Entry(int32_t Tag) : Tag(Tag), Kind(SecSize) {}
```
Problem is that constructor that takes
output section is already busy with SecAddr:
```
Entry(int32_t Tag, OutputSectionBase<ELFT> *OutSec)
: Tag(Tag), OutSec(OutSec), Kind(SecAddr) {}
```
I`ll check what can I do here.
https://reviews.llvm.org/D23663
More information about the llvm-commits
mailing list