[PATCH] D19496: [ELF][MIPS] Handle GOT entries for all non-local symbols uniformly

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 07:54:04 PDT 2016


atanasyan added inline comments.

================
Comment at: ELF/OutputSections.h:139
@@ -136,1 +138,3 @@
+  };
+  std::vector<std::pair<EntryKind, SymbolBody *>> Entries;
   uint32_t TlsIndexOff = -1;
----------------
zatrazz wrote:
> atanasyan wrote:
> > zatrazz wrote:
> > > On my TLS descriptor patch [1], after some discussion I changed the approach of using a vector of vectors to just define the required vectors instead (one for each type). I think using a vector for each type simplifies the code, since it won't require sorting in the finalize method.
> > > 
> > > [1] http://reviews.llvm.org/D18960
> > My motivation was to touch non-MIPS code as little as possible. In that case single vector is a good approach. But if MIPS is not the only architecture requires GOT entries "types" I would be happy to escape GOT sorting.
> > 
> > What is the state of your patch?
> SImilar to your patch my motivation is to enable current supported TLS but for aarch64. The patch does not really touch any aarch64 specifics bits (I plan to send another patch after this is reviewed), and the ideia is to make possible to use this TLS descriptor code not only to support aarch64, but all architectures that have TLS dsecriptor abi (arm, i386, x86_64, and aarch64).
> 
> I got some initial reviews, but currently it requires a thoughtfully one.
I was thinking about using multiple vectors to hold different entries in the `GotSection` class. In the MIPS case that approach simplifies the finalize method because we do not have to sort the entries. But it makes methods which calculate various GOT indexes really messy. In case of MIPS we need at least three containers: for local entries, for global entries, and for TLS related entries.


Repository:
  rL LLVM

http://reviews.llvm.org/D19496





More information about the llvm-commits mailing list