Commit Graph

13 Commits

Author SHA1 Message Date
Rui Ueyama 595026e071 [ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".
llvm-svn: 205694
2014-04-06 21:23:24 +00:00
Rui Ueyama c141c8c59a [ELF] Fix driver bug.
GNU LD-comptaible driver wrongly requires a space after '=' for a few
options such as "-init=<symbol>" or "-entry=<symbol>". This patch is
to fix that bug and add a few tests for it.

llvm-svn: 205693
2014-04-06 21:15:05 +00:00
Rui Ueyama ac0f7ca3a8 [ELF] Fix --soname option.
Currently LLD accepts only "-soname <string>", but all the following
options are actually valid.

  --soname=foo
  --soname foo
  -soname=foo
  -soname foo
  -h foo

This patch fixes that issue.

llvm-svn: 205662
2014-04-05 02:07:04 +00:00
Rui Ueyama 3907f2a802 [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

llvm-svn: 205029
2014-03-28 19:02:06 +00:00
Rui Ueyama a9a5129ec1 [ELF] Add --allow-multiple-definition option.
If --allow-multiple-definition option is given, LLD does not treat duplicate
symbol error as a fatal error. GNU LD supports this option.

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

llvm-svn: 205015
2014-03-28 16:26:38 +00:00
Shankar Easwaran 3d8de47f76 Fix trailing whitespace.
llvm-svn: 200182
2014-01-27 03:09:26 +00:00
Joerg Sonnenberger 4dcee6960f Add default search path if -nostdlib is not provided.
Add basic emulation mapping for NetBSD/amd64, so that clang -m32 works
as expected.

llvm-svn: 198337
2014-01-02 19:18:36 +00:00
Shankar Easwaran 11202deb4a [ELF] Add alias options for start-group/end-group options.
There are aliases for --start-group/--end-group options represented
by -( and -) respectively in the command line.

This change adds and improves the test for the alias options to be
tested.

Looks like users use this option widely than explicitly using
--start-group/--end-group.

llvm-svn: 192470
2013-10-11 17:59:47 +00:00
Shankar Easwaran 7915ff34b7 [lld][LinkingContext][ELF] Allow different output file types.
This adds an option --output-filetype that can be set to either
YAML/Native(case insensitive). The linker would create the outputs
associated with the type specified by the user.

Changes all the tests to use the new option.

llvm-svn: 191183
2013-09-23 04:24:15 +00:00
Shankar Easwaran 70fefd515a [lld][ELF] Group command line options for better usage
llvm-svn: 191033
2013-09-19 20:07:06 +00:00
Joerg Sonnenberger 23f8d43e5c Recognize -Bstatic as alias for -static, clang uses it.
llvm-svn: 190301
2013-09-09 11:48:43 +00:00
Joerg Sonnenberger bd25241e0e Drop the context forceLoadAllArchives() support. Rename the isForceLoad
attribute in LinkerInput to isWholeArchive and use that for deciding
whether library archives should be expanded. Implement the -all_load
option of the Darwin linker using this flag and drop the support for it
in GNU mode.

llvm-svn: 190275
2013-09-08 13:30:14 +00:00
Rui Ueyama 8ccf6da056 Rename *Options.td -> <flavor>Options.td.
Before this patch, name of driver implementation is not consistent with its
option table file. Specifically, LDOptions has a different prefix than
GnuLdDriver.

This patch renames option files, so that the option files have the same prefix
as the corresponding driver files.

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

llvm-svn: 189895
2013-09-04 00:24:35 +00:00