[PATCH] D23663: [ELF] - Linkerscript: set correct synamic tag entries values when LS is used.

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 08:56:14 PDT 2016


evgeny777 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();
----------------
grimar wrote:
> 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.
May be just add extra parameter (Kind) ?


https://reviews.llvm.org/D23663





More information about the llvm-commits mailing list