[PATCH] D19302: ELF: Template LinkerScript class.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 17:21:26 PDT 2016


ruiu created this revision.
ruiu added a reviewer: grimar.
ruiu added a subscriber: llvm-commits.

Originally, linker scripts were basically an alternative way to specify
options to the command line options. But as we add more features to hanlde
symbols and sections, many member functions needed to be templated.
Now most the members are templated. It is probably time to template the
entire class.

Previously, LinkerScript is an executor of the linker script as well as
a storage of linker script configurations. This is not suitable to template
the class because when we are reading linker script files, we don't know
the ELF type yet, so we can't instantiate ELF-templated classes.

In this patch, I defined a new class, ScriptConfiguration, to store
linker script configurations. ScriptParser writes parse results to it,
and LinkerScript uses them.

http://reviews.llvm.org/D19302

Files:
  ELF/Driver.cpp
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/MarkLive.cpp
  ELF/OutputSections.cpp
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19302.54297.patch
Type: text/x-patch
Size: 13736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160420/c24c37e6/attachment.bin>


More information about the llvm-commits mailing list