summaryrefslogtreecommitdiff
path: root/gnu/llvm
AgeCommit message (Collapse)Author
2019-04-26add "elf64_sparc" emulation name so ELF SPARCV9 format can be explicitlyChristian Weisgerber
specified; suggested by and ok kettenis@
2019-04-25Also touch --param ssp-buffer-size when using retguard in lieu of themortimer
stack protector. Fixes 'unused arguments' warning when this argument is given. Noticed by robert@, ok robert@
2019-04-22Remove cast that truncates immediate operands to 32 bits. This fixesMark Kettenis
genassym.sh on sparc64 when using clang as the compiler. ok claudio@, deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-04-20Restore previous section after setting the MIPS ABI marker. This keepsVisa Hankala
the .text section in use after the file header, improving compatibility with gcc. Without this change, module-level inline assembly blocks could end up into wrong section. OK kettenis@ guenther@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-04-17retguard-cookie-in-register is slightly unstable on arm64, so surgicallyTheo de Raadt
disable it in upcoming 6.5 release. (phessler and mortimer have the details)
2019-04-04frame-pointer elimination has encountered some resistance in ports but weTheo de Raadt
are close to release, so punt the change till after-release easier for everyoned and especially naddy ok tedu
2019-04-02Enable frame pointer elimination on i386, amd64 and mips64 when givenmortimer
optimization flags. ok kettenis@ visa@
2019-04-02Emit variable length trap padding in retguard epilogue.mortimer
This adds more trap padding before the return while ensuring that the return is still in the same cache line. ok deraadt@
2019-04-01Consume SSP options when using retguard to prevent warnings.mortimer
ok millert@
2019-03-31If using retguard, we do not also need the stack protector.mortimer
ok deraadt@
2019-03-31Do not store the retguard cookie in frame in leaf functions if possible.mortimer
Makes things slightly faster and also improves security in these functions, since the retguard cookie can't leak via the stack. ok deraadt@
2019-03-05libLLVM in base will be installed as libLLVM.so.major.minor with noJonathan Gray
symlink for libLLVM-7.so or libLLVM.so. Adjust llvm-config to cope and force llvm-config DyLibExists to true. This is specific to LLVM in base this patch should not be used in ports.
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-02-22Improve the X86FixupGadgets pass:mortimer
- Target all four kinds of return bytes (c2, c3, ca, cb) - Fix up instructions using both ModR/M and SIB bytes - Force alignment before instructions with return bytes in immediates - Force alignment before instructions that have return bytes in their encoding - Add a command line switch to toggle the functionality. ok deraadt@
2019-02-18When generating code for OpenBSD/powerpc, avoid unaligned floating-pointMark Kettenis
load and store instructions. The vast majority of PowerPC CPUs that OpenBSD runs on don't implement those and will generate an alignment exceptions. While we do emulate lfd and stfd (to work around GCC bugs), we don't emulate lfs and stfs. It is way more efficient to have the compiler generate code that only uses aligned load and store instructions. Based on a diff from Georg Koehler. ok patrick@, visa@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-02-17Skip retguard instructions in prologue detection.mortimer
ok patrick@
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2019-02-13Merge LLVM commits r340844, r353818 and r353819 from the 8.0 branchPatrick Wildt
to fix a regression in floating point operations. Bluhm noticed that the bc regression test has been failing after the upgrade to 7.0.1 because setting the floating point control register was in some cases reordered erroneously. Found and tested by bluhm@ ok bluhm@ kettenis@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-02-10On OpenBSD/powerpc (and NetBSD/powerpc) long double == double like onMark Kettenis
FreeBSD/powerpc. From George Koehler. ok millert@, deraadt@, visa@
2018-04-06Import LLVM 6.0.1 release including clang, lld and lldb.Patrick Wildt
"where is the kaboom?" deraadt@
2019-02-05Zap unneeded argument to BuildMI().mortimer
ok dlg@
2019-02-04initialize SaveArgs variable in case neither -msave-args or -mno-save-args ↵Sebastien Marie
are on command-line. and use a bool type for a boolean in C++. ok kettenis@ deraadt@
2019-01-30implement -msave-args in clang/llvm, like the sun did for gccDavid Gwynne
this is a bit different to gcc as gcc likes to use movs to move stuff on and off the stack, and directly updates the stack pointers with add and sub instructions. llvm prefers to use push and pop instructions, is a lot more careful about keeping track of how much stuff is currently on the stack, and generally pops the frame pointer rather than do maths on it. -msave-args adds a bunch of pushes as the first thing a function prologue does. to keep the stack aligned, if there's an odd number of arguments to the function it pushes the first one again to put the frame back on a 16 byte boundary. to undo the pushes the frame pointer needs to be updated in function epilogues. clang emits a series of pops to fix up the registers on the way out, but popping saved arguments is a waste of time and harmful to actual data in the function. rather than add an offset to the stack pointer, -msave-args emits a leaveq operation to fix up the frame again. leaveq is effectively mov rbp,rsp; pop rbp, and is a single byte, meaning there's less potential for gadgets compared to a direct add to rsp, or an explicit mov rbp,rsp. the only thing missing compared to the gcc implementation is adding the SUN_amd64_parmdump dwarf flag to affected functions. if someone can tell me how to add that from the frame lowering code, let me know. when enabled in kernel builds again, this will provide useful arguments in ddb stack traces again.
2018-04-06Import LLVM 6.0.1 release including clang, lld and lldb.Patrick Wildt
"where is the kaboom?" deraadt@
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-01-28On i386, produce binaries that are compatible with our W^X implementation.Mark Kettenis
Note that this will still produce binaries that have the read-only segment placed before the executable segment. This means that on machines without the NX bit, the read-only segment is now executable. However on machines with an NX bit, the ordering used by lld means the program headers are no longer executable since they are now part of the read-only segment. ok deraadt@, naddy@
2019-01-27Tedu files that got removed in LLVM 7.0.1.Patrick Wildt
2019-01-27Re-add files that were previously removed but are now part of LLVM 7.0.1.Patrick Wildt
2019-01-27Tedu files that got removed in LLVM 7.0.1.Patrick Wildt
2019-01-27Merge LLVM 7.0.1 release.Patrick Wildt
With fixes from mortimer@ (thanks!) Tested by many, especially naddy@ (thanks!)
2019-01-27Import LLVM 7.0.1 release including clang, lld and lldb.Patrick Wildt
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2017-01-24Import LLVM 4.0.0 rc1 including clang and lld to help the currentPatrick Wildt
development effort on OpenBSD/arm64.
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@
2019-01-17Use a 64-bit register when required for inline asm on sparc64.Mark Kettenis
Without this, values get truncated to 32-bit. Makes a sparc64 kernel actually work when compiled with clang. ok pguenther@, visa@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2018-12-30Turn on -mretpoline by default in clang on amd64, but turn it offPhilip Guenther
explicitly in SMALL_KERNEL kernel builds. tweaks from jsg@ and tb@ ok deraadt@ kettenis@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2018-12-29The %b printf extension in the kernel is not fixed to a int type. On sparc64Claudio Jeker
there are various %llb formats. Adjust the code to handle the length specifiers and type check like it is used by the regular case. OK guenther@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2018-10-24Generate __data_start symbol that marks the start of .data when __data_startMark Kettenis
is referenced from code being linked. ok deraadt@, naddy@, guenther@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2018-10-23Add support for -z initfirst.Mark Kettenis
From upstream r335090. ok guenther@
2018-10-22Accept both `--foo bar` and `--foo=bar` styles options.Christian Weisgerber
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@