llvm-project/lld
Pete Cooper 47e5399cd3 Fix more cases of UB from allocating 0 sized data. NFC.
The size of a section can be zero, even when it contains atoms, so
long as all of the atoms are also size 0.  In this case we were
allocating space for a 0 sized buffer.

Changed this to only allocate when we need the space, but also cleaned
up all the code to use MutableArrayRef instead of uint8_t* so its much much
safer as we get bounds checking on all of our section creation logic.

llvm-svn: 264204
2016-03-23 22:19:16 +00:00
..
COFF [COFF] Don't call memcpy with a NULL argument 2016-03-20 23:10:12 +00:00
ELF ELF: Split BitcodeCompiler::compile. 2016-03-23 21:19:27 +00:00
cmake/modules
docs We do not use libLTO, so fix the error. 2016-03-22 20:58:15 +00:00
include/lld Fix operator= on OwningAtomPtr to call destructor when needed. 2016-03-22 21:08:39 +00:00
lib Fix more cases of UB from allocating 0 sized data. NFC. 2016-03-23 22:19:16 +00:00
test [LTO] Keep linkonce symbols when required. 2016-03-23 18:41:48 +00:00
tools/lld Inline a trivial CMakeLists.txt. 2016-03-03 01:56:23 +00:00
unittests Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes. 2016-03-21 18:32:35 +00:00
.arcconfig Update Phabricator server. 2014-04-07 04:52:24 +00:00
.clang-format Remove redundant "Standard: Cpp11" tag. The LLVM style has used the 2014-07-04 12:08:03 +00:00
.gitignore Update .gitignore to ignore hidden MacOSX Finder droppings 2014-07-16 21:01:17 +00:00
CMakeLists.txt Inline a trivial CMakeLists.txt. 2016-03-03 01:56:23 +00:00
CODE_OWNERS.TXT Add initial CODE_OWNERS.TXT file 2015-07-25 00:44:37 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:14:35 +00:00
README.md

README.md

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.