llvm-capstone/lld
Tom Stellard c17a04c6c8 ELF: Only unlink regular files
Summary:
If the output file is a character file (e.g. /dev/null) unlinking it could
potentially destabilize the user's system.  For example,
unlinking causes `lld %input -o /dev/null` to replace /dev/null with a
regular file, which will lead to unexpected behavior in other programs
that read from /dev/null, and worse than expected peformance for
programs that write to /dev/null.

This makes it possible to run the test-release.sh script as root.
Prior to this patch, the ELF/basic.s test would replace
/dev/null with a regular file, which would cause crashes in llvm
test-suite programs that piped /dev/null to stdin.

For example, if you run the test-relase.sh script as root,

Reviewers: ruiu

Reviewed By: ruiu

Subscribers: emaste, llvm-commits

Differential Revision: https://reviews.llvm.org/D34917

llvm-svn: 307092
2017-07-04 16:03:34 +00:00
..
cmake/modules [lld][cmake] Fix BUILD_SHARED_LIBS installation 2017-01-24 10:41:02 +00:00
COFF [COFF] Add initial support for linking ARM64 binaries 2017-07-01 20:29:27 +00:00
docs Update documentation to reflection disuse of external cvtres. 2017-06-17 02:26:27 +00:00
ELF ELF: Only unlink regular files 2017-07-04 16:03:34 +00:00
include/lld Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
lib Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR 2017-06-30 20:57:21 +00:00
test Improve error message. 2017-07-04 15:53:57 +00:00
tools/lld Accept not only lld-link but also LLD-LINK, for example. 2017-04-12 18:29:52 +00:00
unittests Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Dummy commit to trigger CMake reconfiguration and unbreak Sphinx build 2017-05-04 08:32:33 +00:00
CODE_OWNERS.TXT
LICENSE.TXT
README.md Test commit 2017-06-24 21:16:41 +00:00

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.