summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Accept both `--foo bar` and `--foo=bar` styles options.naddy2018-10-221-15/+13
| | | | | | | GNU linkers by convention supports both `--foo bar` and `--foo=bar` styles for all long options that take arguments. From upstream r326506. ok patrick@ kettenis@
* When merging sections into the output, lld tries to adjust the alignment ofkettenis2018-10-211-1/+3
| | | | | | | | | | the section to be at least as large as the entry size of the section. This causes a later check that validates the alignment to fail if the entry size isn't a power of two. This happens when building some of the java support code in ports gcc. Fix this by sticking to the original alignment if the entry size isn't a power of two. ok guenther@, naddy@
* Enable the integrated assembler on mips64.visa2018-10-211-4/+6
| | | | | | | | Upstream references: https://reviews.llvm.org/D31557 https://reviews.llvm.org/D48515 OK kettenis@
* Allow preemption of functions with protected visibility. Disallowing thiskettenis2018-09-291-1/+2
| | | | | | | | | | makes no sense. Yes it breaks function address equality and therefore the expectations of the standard C language. However declaring symbols with protected visibility isn't standard C in the first place. Fixes linking non-PIC/PIE code with lld on amd64. ok millert@
* Fix --exclude-libs option. Based on code already committed upstream.kettenis2018-09-111-1/+1
| | | | tested by naddy@
* Add retguard for arm64.mortimer2018-08-121-1/+2
| | | | ok deraadt@
* Merge '.openbsd.randomdata.*' sections into a single '.openbsd.randomdata'guenther2018-06-121-1/+2
| | | | | | section when linking, as we do when using ld from binutils. ok mortimer@ deraadt@
* Pass -nopie to the linker when -pg is specified to make theyasuoka2018-06-071-2/+3
| | | | | | profiler(gprof) work properly. ok mpi
* Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer2018-06-065-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | random cookies to protect access to function return instructions, with the effect that the integrity of the return address is protected, and function return instructions are harder to use in ROP gadgets. On function entry the return address is combined with a per-function random cookie and stored in the stack frame. The integrity of this value is verified before function return, and if this check fails, the program aborts. In this way RETGUARD is an improved stack protector, since the cookies are per-function. The verification routine is constructed such that the binary space immediately before each ret instruction is padded with int03 instructions, which makes these return instructions difficult to use in ROP gadgets. In the kernel, this has the effect of removing approximately 50% of total ROP gadgets, and 15% of unique ROP gadgets compared to the 6.3 release kernel. Function epilogues are essentially gadget free, leaving only the polymorphic gadgets that result from jumping into the instruction stream partway through other instructions. Work to remove these gadgets will continue through other mechanisms. Remaining work includes adding this mechanism to assembly routines, which must be done by hand. Many thanks to all those who helped test and provide feedback, especially deaadt, tb, espie and naddy. ok deraadt@
* Add ret protctor options as no-ops.mortimer2018-06-032-0/+14
|
* Work around a bug where discarding the .ARM.exidx section in the armv7 kernelkettenis2018-06-031-0/+3
| | | | | | | linker script makes ld.lld(1) crash. This has been fixed in a different (proper?) way upstream but backporting their fix is a bit too invasive. ok patrick@
* Switch armv7 to the "softfp" floating-point ABI. The ABI is identical tokettenis2018-05-051-1/+1
| | | | | | | the "soft" floating-point ABI but this does allow the compiler to generate FPU instructions. ok deraadt@
* keep the STT_FILE symbol in the table so that we know what filerobert2018-04-121-1/+1
| | | | | | was used to compile and object ok kettenis@
* add back ld.lld 6.0 changesjsg2018-04-071-1/+13
|
* Tedu files that got removed in LLVM 6.0.0.patrick2018-04-06203-24311/+0
|
* Merge LLVM 6.0.0 release.patrick2018-04-0623-15038/+7229
|
* Import LLVM 6.0.1 release including clang, lld and lldb.patrick2018-04-062358-43019/+161160
| | | | "where is the kaboom?" deraadt@
* Add a manual page for lld from lld svn rev 326463 with options notjsg2018-03-021-0/+515
| | | | | | | | present in lld 5.0.1 removed (--build-id=fast, -z muldefs, -z retpolineplt). This includes a bunch of mdoc changes suggested by schwarze@ that were recently committed upstream. ok jmc@ schwarze@ kettenis@ deraadt@
* add clang-local(1) to SEE ALSOjsg2018-01-221-1/+1
| | | | suggested by jmc@ ok patrick@
* Make lld respect ALIGN directives on output sections even with -r. Fixeskettenis2018-01-011-5/+9
| | | | | | the generation of gap.o. ok patrick@
* Cherry-pick a change from LLD to make the behavior of the -v optionpatrick2017-12-261-3/+4
| | | | | | | | more closer to GNU linkers. This should help with autoconf/libtool compatibility in ports. Requested by Brad "no objection" kettenis@
* Tedu files that got removed in LLVM 5.0.1.patrick2017-12-251-27/+0
|
* Merge LLVM 5.0.1 release.patrick2017-12-244-8/+23
|
* Import LLVM 5.0.1 release including clang, lld and lldb.patrick2017-12-2434-88/+244
|
* kbind(2) for the win: we can always put .got.plt in RELROguenther2017-10-241-0/+4
| | | | ok kettenis@ deraadt@
* Tedu files that got removed in LLVM 5.0.0.patrick2017-10-0443-5917/+0
|
* Tedu files that got removed in LLVM 5.0.0.patrick2017-10-0434-26774/+0
|
* Merge LLVM 5.0.0 release.patrick2017-10-0424-2832/+6074
|
* Import LLVM 5.0.0 release including clang, lld and lldb.patrick2017-10-047562-35841/+1413273
|
* Actually enable the kprintf format attribute.kettenis2017-08-071-3/+4
| | | | ok florian@
* Backport https://reviews.llvm.org/D29778. Fixes a bug where clang waskettenis2017-08-041-3/+5
| | | | | | | optimizing code around an lgamma(3) call a bit too much. Fixes the lib/libm/lgamma regress test. ok patrick@, millert@
* Disable -Waddress-of-packed-member by default.kettenis2017-07-291-1/+1
| | | | | | | While these warnings have the potential to be useful, there are too manu false positives right now. ok deraadt@
* On OpenBSD disable the malloc/calloc/realloc/free/str*dup builtins, sincederaadt2017-07-281-0/+12
| | | | | | | | 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
* teach clang about our syslog format attributerobert2017-07-273-2/+5
| | | | ok deraadt@
* push back -pie to the linker if -pie is specified to avoid an unused argumentrobert2017-07-271-0/+3
| | | | | | warning ok kettenis@, deraadt@
* Enable -fwrapv by default with clang to treat signed integer overflowsjsg2017-06-061-1/+2
| | | | | | | | | | | | | 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@
* Synonym -Wno-cpp for -Wno-#warnings. That one is not a headache forespie2017-06-021-0/+1
| | | | | | scripting. (got it into upstream, it's just a backport) okay kettenis@, patrick@
* Enable TLS support but default to the emulatated TLS model. Enable thekettenis2017-05-092-3/+2
| | | | | | | | 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@
* Disable colored diagnostics in LLVM's lld.patrick2017-04-161-1/+1
| | | | Requested by deraadt@
* Add "supported targets" in lld --help output to be compatible with whatjsg2017-03-241-0/+13
| | | | | | | | libtool generated configure scripts expect. Otherwise they might assume shared libraries aren't supported. From lld svn revisions 298568 and 298571. Discussed with kettenis@
* Add "(compatible with GNU linkers)" to the lld version output to avoidjsg2017-03-241-4/+20
| | | | | | | | | 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@
* Work around a problem where linker-generated symbols are not properlykettenis2017-03-191-0/+6
| | | | | | | | | | 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@
* Add support for -znodlopen.kettenis2017-03-183-0/+4
| | | | ok patrick@
* Merge LLVM 4.0.0 release.patrick2017-03-145-42/+57
|
* Import LLVM 4.0.0 release including clang and lld.patrick2017-03-1457-575/+706
|
* Disable colored diagnostics in the clang frontend.patrick2017-03-091-1/+1
| | | | Requested by deraadt@, millert@ and some more.
* Fix the types used on aarch64 to match what we have in <sys/types.h>.kettenis2017-02-251-1/+2
| | | | From Brad Smith.
* Make sure the .eh_frame ends with a terminator. This avoids creating akettenis2017-02-251-1/+1
| | | | | | | | | zero-sized .eh_frame section, which confuses the strip from our frankenbinutils. With this diff lld seems to be usable as the arm64 system linker. ok patrick@, jsg@
* Disable -Wpointer-sign warnings per defaultstefan2017-02-121-1/+1
| | | | base gcc does the same. suggested by and ok jsg@
* Fix creation of the library name, as assigning a string to a StringRefpatrick2017-01-311-1/+2
| | | | | | | seems to cause bad behaviour. Instead call toStringRef() and use its return value. ok tom@