llvm-project/lld
Rui Ueyama 327db80dd5 [ELF] Support --defsym=<symbol>=<symbol>.
Currently LLD supports --defsym only in the form of
--defsym=<symbol>=<integer>, where the integer is interpreted as the
absolute address of the symbol. This patch extends it to allow other
symbol name to be given as an RHS value. If a RHS value is a symbol
name, the LHS symbol will be defined as an alias for the RHS symbol.

Internally, a LHS symbol is represented as a zero-size defined atom
who has an LayoutAfter reference to an undefined atom, whose name is
the RHS value. Everything else is already implemented -- Resolver
will resolve the undefined symbol, and the layout pass will layout
the two atoms at the same location. Looks like it's working fine.

Note that GNU LD supports --defsym=<symbol>=<symbol>+<addend>. That
feature is out of scope of this patch.

Differential Revision: http://reviews.llvm.org/D3332

llvm-svn: 206417
2014-04-16 20:58:57 +00:00
..
cmake/modules Add VTune as an optional external dependency and add task tracking. 2013-04-06 00:56:40 +00:00
docs [core] add SectionGroup support 2014-03-26 16:37:13 +00:00
include/lld [ELF] Support --defsym=<symbol>=<symbol>. 2014-04-16 20:58:57 +00:00
lib [ELF] Support --defsym=<symbol>=<symbol>. 2014-04-16 20:58:57 +00:00
test [ELF] Support --defsym=<symbol>=<symbol>. 2014-04-16 20:58:57 +00:00
tools [PECOFF] Rename link.exe -> lld-link.exe. 2014-03-21 20:41:48 +00:00
unittests [ELF] Support --defsym=<symbol>=<symbol>. 2014-04-16 20:58:57 +00:00
utils Replace OwningPtr with std::unique_ptr. 2014-03-13 16:20:38 +00:00
.arcconfig Update Phabricator server. 2014-04-07 04:52:24 +00:00
.clang-format Add .clang-format file to ensure C++11 LLVM coding style. 2013-12-11 22:39:33 +00:00
.gitignore docs: Sketch Sphinx based docs structure. 2012-04-06 21:02:20 +00:00
CMakeLists.txt [C++1y] Don't error if the user is enabling C++1y, which is *newer* than 2014-03-01 03:18:56 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
README.md Test commit 2012-09-14 00:00:39 +00:00

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.