[PATCH] D13815: [ELF2] Add support for Gnu Hash section

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 09:57:31 PDT 2015


ikudrin created this revision.
ikudrin added reviewers: rafael, ruiu.
ikudrin added a subscriber: llvm-commits.
ikudrin added a project: lld.

This patch implements --hash-style command line switch.
* By default, or with "sysv" or "both" parameters the linker generates a standard ELF hash section.
* With "gnu" or "both" it produces Gnu-style hash section.

Support for that section requires symbols in the dynamic symbol table to be divided in two groups
(not hashed and hashed symbols) and the last group have to be sorted to correspond the hash
table of the Gnu Hash section.

The division function, as well as estimations for the section's parameters, are just the first rough
variants and the subjects for further adjustments.



http://reviews.llvm.org/D13815

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Options.td
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Writer.cpp
  test/elf2/gnu-hash-table.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13815.37606.patch
Type: text/x-patch
Size: 23885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151016/bece1f83/attachment.bin>


More information about the llvm-commits mailing list