[ELF] Support --defsym option to define an absolute symbol.

Press ? to show keyboard shortcuts.
Committed
ruiuMar 28 2014, 12:02 PM
Differential Revision
D3208: [ELF] Support --defsym option to define an absolute symbol.
Parents
rL205028: Parse .gpdword and convert another llc -filetype=obj test.
Branches
Unknown
Tags
Unknown
Description

[ELF] Support --defsym option to define an absolute symbol.

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.

Differential Revision: http://llvm-reviews.chandlerc.com/D3208

rL205029

lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h

Loading...

lld/trunk/lib/Core/LinkingContext.cpp

Loading...

lld/trunk/lib/Driver/GnuLdDriver.cpp

Loading...

lld/trunk/lib/Driver/GnuLdOptions.td

Loading...

lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp

Loading...

lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp

Loading...

lld/trunk/test/elf/defsym.objtxt

Loading...

lld/trunk/test/pecoff/include.test

Loading...

lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp

Loading...

Add Comment