freebsd-skq/contrib/llvm/tools
Ed Maste 19703503ba lld: Omit PT_NOTE for SHT_NOTE without SHF_ALLOC
A non-alloc note section should not have a PT_NOTE program header.

Found while linking ghc (Haskell compiler) with lld on FreeBSD.  Haskell
emits a .debug-ghc-link-info note section (as the name suggests, it
contains link info) as a SHT_NOTE section without SHF_ALLOC set.

For this case ld.bfd does not emit a PT_NOTE segment for
.debug-ghc-link-info.  lld previously emitted a PT_NOTE with p_vaddr = 0
and FreeBSD's rtld segfaulted when trying to parse a note at address 0.

LLVM PR:	https://llvm.org/pr37361
LLVM review:	https://reviews.llvm.org/D46623

PR:		226872
Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
2018-05-09 11:17:01 +00:00
..
bugpoint Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
clang Recommit r332501, with an additional upstream fix for "Cannot lower 2018-04-20 18:20:55 +00:00
llc Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
lld lld: Omit PT_NOTE for SHT_NOTE without SHF_ALLOC 2018-05-09 11:17:01 +00:00
lldb lldb: remove assertion that target_arch is FreeBSD 2018-04-24 19:26:58 +00:00
lli Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-ar Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-as Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-bcanalyzer Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-cov Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545, 2017-12-29 00:56:15 +00:00
llvm-cxxdump Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-cxxfilt Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-diff Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-dis Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-dwarfdump Merge llvm trunk r321414 to contrib/llvm. 2017-12-24 01:04:58 +00:00
llvm-extract Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-link Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-lto Merge llvm trunk r321414 to contrib/llvm. 2017-12-24 01:04:58 +00:00
llvm-lto2 Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-mc Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
llvm-modextract Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-nm Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-objcopy Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788, 2018-01-06 23:44:14 +00:00
llvm-objdump Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545, 2017-12-29 00:56:15 +00:00
llvm-pdbutil Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-profdata Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-readobj Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2018-01-24 22:35:00 +00:00
llvm-rtdyld Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-stress Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-symbolizer Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-xray Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
opt Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2018-02-02 22:28:12 +00:00