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

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 13:57:40 PDT 2016


atanasyan created this revision.
atanasyan added reviewers: rafael, ruiu.
atanasyan added a subscriber: llvm-commits.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.
Herald added a subscriber: sdardis.

The patch assigns 'kind' to each GOT entry. Now they are MipsLocal, MipsGlobal and Regular. That allows to create entries for all non-local symbols and handle them uniformly. From the other side we have to sort GOT entries before writing .got section accordingly to their types.

The main motivations for this patch is preparation for support MIPS TLS relocations. It might sound like a joke but for GOT entries related to TLS relocations MIPS ABI uses almost regular approach with creation of dynamic relocations for each GOT enty etc. But we need to separate these 'regular' TLS related entries from MIPS specific local/global parts of GOT. ABI declare simple solution - all TLS related entries allocated at the end of GOT after local/global parts. To support these scheme, we anyway have to differentiate and sort GOT entries.

Repository:
  rL LLVM

http://reviews.llvm.org/D19496

Files:
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Symbols.cpp
  ELF/Target.cpp
  test/ELF/mips-got16.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19496.54898.patch
Type: text/x-patch
Size: 10624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/ecd1be37/attachment.bin>


More information about the llvm-commits mailing list