[PATCH] D18772: [lld] Implement --dynamic-list

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 13:28:40 PDT 2016


zatrazz created this revision.
zatrazz added reviewers: ruiu, rafael.
zatrazz added subscribers: llvm-commits, rengolin.
zatrazz set the repository for this revision to rL LLVM.

This patch implements the --dynamic-list option, which adds a list of
global symbol that either should not be bounded by default definition
when creating shared libraries, or add in dynamic symbol table in the
case of creating executables.

The patch modifies the ScriptParserBase class to use a list of Token
instead of StringRef, which contains information if the token is a
quoted or unquoted strings. It is used to use a faster search for
exact match symbol name.

The input file follow a similar format of linker script with some
simplifications (it does not have scope or node names). It leads
to a simplified parser define in DynamicList.{cpp,h}.

Symbol match is done by consulting two lists: first a StringSet
for exact match names (defined in quoted strings) and then each
glob definition (in the order of definition).

This patch depends on http://reviews.llvm.org/D18771

Repository:
  rL LLVM

http://reviews.llvm.org/D18772

Files:
  ELF/CMakeLists.txt
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Driver.h
  ELF/DynamicList.cpp
  ELF/DynamicList.h
  ELF/LinkerScript.cpp
  ELF/Options.td
  ELF/ScriptParser.cpp
  ELF/ScriptParser.h
  ELF/Writer.cpp
  test/ELF/dynamic-list.s
  test/ELF/invalid-dynamic-list.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18772.52613.patch
Type: text/x-patch
Size: 21268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160404/6dd6eead/attachment.bin>


More information about the llvm-commits mailing list