[ELF] - Implement -z nodefaultlib
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 27 Nov 2018 09:48:17 +0000 (09:48 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 27 Nov 2018 09:48:17 +0000 (09:48 +0000)
commita1b3ddbfecc4c90c882bcfd61fa176eeb58f8e7c
treee5db3265ec8551af7acbb334498a35c024576ade
parentfec4f351d5aecf521b7a172879e260a0396ad96a
[ELF] - Implement -z nodefaultlib

This is https://bugs.llvm.org//show_bug.cgi?id=38978

Spec says that:
"Objects may be built with the -z nodefaultlib option to
suppress any search of the default locations at runtime.
Use of this option implies that all the dependencies of an
object can be located using its runpaths.
Without this option, which is the most common case, no
matter how you augment the runtime linker's library
search path, its last element is always /usr/lib for 32-bit
objects and /usr/lib/64 for 64-bit objects."

The patch implements this option.

Differential revision: https://reviews.llvm.org/D54577

llvm-svn: 347647
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/SyntheticSections.cpp
lld/docs/ld.lld.1
lld/test/ELF/dt_flags.s