summaryrefslogtreecommitdiff
path: root/gnu/llvm
AgeCommit message (Collapse)Author
2017-12-26Cherry-pick a change from LLD to make the behavior of the -v optionPatrick Wildt
more closer to GNU linkers. This should help with autoconf/libtool compatibility in ports. Requested by Brad "no objection" kettenis@
2017-12-26Cherry-pick a change from LLVM that marks specific pseudo memoryPatrick Wildt
instructions to have side effects so the optimizer does not reorder them across fnstcw/fldcw sequences. Fixes a bug seen in sqlite3 on i386. ok kettenis@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-12-25Tedu files that got removed in LLVM 5.0.1.Patrick Wildt
2017-12-24Merge LLVM 5.0.1 release.Patrick Wildt
2017-12-24Import LLVM 5.0.1 release including clang, lld and lldb.Patrick Wildt
2017-11-21The compiler is generally free to allocate general purpose registers in whatevermortimer
order it chooses. Reasons for choosing one register before another usually incl ude compiled instruction size (avoidance of REX prefixes, etc.) or usage convent ions, but somehow haven't included security implications in the compiled bytecod e. Some bytecode is more useful in polymorphic ROP sequences than others, so it seems prudent to try to avoid that bytecode when possible. This patch moves EBX/RBX towards the end of the allocation preference for 32 and 64 bit general purpose registers. Some instructions using RBX/EBX/BX/BL as a de stination register end up with a ModR/M byte of C3 or CB, which is often useful in ROP gadgets. Because these gadgets often occur in the middle of functions, th ey exhibit somewhat higher diversity than some other C3/CB terminated gadgets. T his change removes about 3% of total gadgets from the kernel, but about 6% of un ique gadgets. There are other possible changes in this direction. BX/BL are obvious next targe ts for avoidance, and MM3/XMM3 may also be useful to try to avoid if possible. ok deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-10-24kbind(2) for the win: we can always put .got.plt in RELROPhilip Guenther
ok kettenis@ deraadt@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2017-10-04Tedu files that got removed in LLVM 5.0.0.Patrick Wildt
2017-10-04Tedu files that got removed in LLVM 5.0.0.Patrick Wildt
2017-10-04Merge LLVM 5.0.0 release.Patrick Wildt
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-09-28make clang include a FILE symbol for .(s|S) filesRobert Nagy
This is mostly needed by syspatch at the moment to be to be able to re-link in the same order as the original libraries were linked with by relying on the readelf(1) and without this .(s|S) assembly files were not getting a file directive. A bug reports has been filed as well: https://bugs.llvm.org/show_bug.cgi?id=34019 ok deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-08-07Actually enable the kprintf format attribute.Mark Kettenis
ok florian@
2017-08-04Backport https://reviews.llvm.org/D29778. Fixes a bug where clang wasMark Kettenis
optimizing code around an lgamma(3) call a bit too much. Fixes the lib/libm/lgamma regress test. ok patrick@, millert@
2017-08-04remove llvm's .gitignore file; upstream have separate repos for clang, lld,Stuart Henderson
etc but as they're directly in our main tree, so the ignore file causes problems for people using cvs->git conversions. kettenis suggested removing the file rather than just commenting-out the relevant repos, patrick agrees.
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-08-01Use int3 trap padding between functions instead of trapsleds with a leading ↵mortimer
jump. ok deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-07-29Disable -Waddress-of-packed-member by default.Mark Kettenis
While these warnings have the potential to be useful, there are too manu false positives right now. ok deraadt@
2017-07-29Fix trapsleds on i386mortimer
ok deraadt@
2017-07-28On OpenBSD disable the malloc/calloc/realloc/free/str*dup builtins, sinceTheo de Raadt
they can perform strange transforms and optimizations. Some of those could gain a slight advantage, but would avoid the variety of important runtime checks our malloc(3) code does. In essence, the transforms performed are considered "anti-mitigation". ok kettenis robert, discussions with others
2017-07-27teach clang about our syslog format attributeRobert Nagy
ok deraadt@
2017-07-27push back -pie to the linker if -pie is specified to avoid an unused argumentRobert Nagy
warning ok kettenis@, deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-06-28if we return nullptr for a "noexec" section, then don't change section.Marc Espie
prevents core dumps :) okay tedu@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-06-27trapsleds for clang, similar to the change on gas side.Theo de Raadt
Also from Todd Mortimer tested by espie
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-06-21For a decade or more, we've patched gcc to make -fno-ident the default.Ted Unangst
clang doesn't seem to have a command line option for the feature, so just hard wire it off. We don't need advertisements in our binaries. ok deraadt
2017-06-06Enable -fwrapv by default with clang to treat signed integer overflowsJonathan Gray
as defined. This is done to prevent dangerous optimisations which could remove security critical overflow checks. Base gcc has -fno-strict-overflow by default, with clang this is identical to -fwrapv. Prompted by naddy@ discovering a hang with a clang compiled i386 kernel that was resolved with -fwrapv. ok kettenis@ pascal@
2017-06-02Synonym -Wno-cpp for -Wno-#warnings. That one is not a headache forMarc Espie
scripting. (got it into upstream, it's just a backport) okay kettenis@, patrick@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-05-29openbsd does not use nonexec stack segment header hints.Ted Unangst
in fact, false is a much better default for UsesNonexecutableStackSection. platforms that require it can reenable, instead, saving the rest of us an unnecessary program header (causes trouble for some special binaries). ok kettenis
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-05-09Enable TLS support but default to the emulatated TLS model. Enable theMark Kettenis
runtime support code libcompiler_rt for this. This code uses functions that live in libpthread, so code that uses TLS support will need to be linked with -lpthread. This should allow more ports to build with base clang. ok espie@
2017-04-16Disable colored diagnostics in LLVM's lld.Patrick Wildt
Requested by deraadt@
2017-03-24Add "supported targets" in lld --help output to be compatible with whatJonathan Gray
libtool generated configure scripts expect. Otherwise they might assume shared libraries aren't supported. From lld svn revisions 298568 and 298571. Discussed with kettenis@
2017-03-24Add "(compatible with GNU linkers)" to the lld version output to avoidJonathan Gray
problems with configure scripts generated with libtool.m4 that would otherwise have to be regenerated with a patched libtool. Among other things this fixes the build of Mesa on arm64 with lld. From lld svn revision 298532. ok kettenis@
2017-03-19Work around a problem where linker-generated symbols are not properlyMark Kettenis
versioned and end up as local symbols despite being explicitly listed as global in the version script. This breaks out brk()/sbrk() implementation. The diff is only a partial solution and unlikely to be accepted as-is upstream. We'll keep it as a local diff until a better solution is found. ok guenther@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2017-03-18Add support for -znodlopen.Mark Kettenis
ok patrick@
2017-03-14Merge LLVM 4.0.0 release.Patrick Wildt
2017-03-14Import LLVM 4.0.0 release including clang and lld.Patrick Wildt
2017-03-09Disable colored diagnostics in the clang frontend.Patrick Wildt
Requested by deraadt@, millert@ and some more.