[PATCH] [ELF] Support --defsym option to define an absolute symbol.
Rui Ueyama
ruiu at google.com
Thu Mar 27 18:40:35 PDT 2014
Hi Bigcheese,
This patch is to support --defsym option for ELF file format/GNU-compatible
driver. Currently it takes a symbol name followed by '=' and a number. If such
option is given, the driver sets up an absolute symbol with the specified
address. You can specify multiple --defsym options to define multiple symbols.
GNU LD's --defsym provides many more features. For example, it allows users to
specify another symbol name instead of a number to define a symbol alias, or it
even allows a symbol plus an offset (e.g. --defsym=foo+3) to define symbol-
relative alias. This patch does not support that, but will be supported in
subsequent patches.
http://llvm-reviews.chandlerc.com/D3208
Files:
include/lld/Core/LinkingContext.h
include/lld/ReaderWriter/ELFLinkingContext.h
include/lld/ReaderWriter/PECOFFLinkingContext.h
lib/Core/LinkingContext.cpp
lib/Driver/GnuLdDriver.cpp
lib/Driver/GnuLdOptions.td
lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
test/elf/defsym.objtxt
test/pecoff/include.test
unittests/DriverTests/GnuLdDriverTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3208.1.patch
Type: text/x-patch
Size: 11858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140327/65319f1c/attachment.bin>
More information about the llvm-commits
mailing list