summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
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-29Correct LLVM backend version.Patrick Wildt
From Brad
2019-01-29add AMDGPUCodeGenJonathan Gray
2019-01-29add Makefiles for AMDGPU targetJonathan Gray
ok patrick@
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-27Install lldb's manpage directly from the GNU directory, like lld does.Patrick Wildt
2019-01-27regenPatrick Wildt
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-27Remove specific clang version from check for clang.Patrick Wildt
2019-01-27Update clang build infrastructure for 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-19CXXFLAGS are the correct spelling for c++ options.Ted Unangst
ok deraadt millert
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@
2019-01-15Fix the inter-library dependency for libedit and libreadline.YASUOKA Masahiko
Previously they tried to depend on libtermcap which actually doesn't exist in the objdir. ok jca
2019-01-13Map SHT_LLVM_ADDRSIG to stringPhilip Guenther
ok kettenis@ deraadt@
2019-01-13Ignore LLVM 7's ADDRSIG section.Philip Guenther
Problem reported by bluhm@ ok kettenis@
2019-01-12Check for the CPU architecture and not the system architecture whenChristian Weisgerber
tweaking the protection flags. ok phessler@ deraadt@
2019-01-11disable the correct performance options, per-architectureTheo de Raadt
with naddy, ok guenther mortimer
2019-01-10Drop dead links to loria.fr and cvshome.orgJeremie Courreges-Anglas
Pointed out by Matteo Niccoli, ok bluhm@ sthen@
1995-12-19raw import of cvs-1.6Theo de Raadt
2019-01-08Disable ret-protector and retpoline protections in the clang compilerAlexander Bluhm
to regain build performance. OK deraadt@ guenther@ kettenis@
2019-01-07Don't print "allocated section '.foobar' not in segment" warning forMark Kettenis
zero-sized sections. ok deraadt@, guenther@
2019-01-04Make gas ignore the ".set hardfloat" directive on mips64.Visa Hankala
The directive is needed in certain parts of the kernel code when compiling using clang. By ignoring the directive, the old toolchain will still be able to build the kernel after the code has been adjusted for clang. OK kettenis@
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-12-25Remove unused static function since clang errors out because of this.Claudio Jeker
OK visa@, mpi@, guenther@
2018-12-22Add support for R_MIPS_PC32 relocation. It is needed for linking codeVisa Hankala
that has been compiled using clang. The added code is based on old binutils code from year 2000. Prodded by and OK jca@, OK kettenis@ guenther@
2018-12-18The scripts just tests whether GENERATE_PIE_SCRIPT is set and ignores itsPhilip Guenther
value, so setting it to 'no' was completely misleading
2018-12-18Generate PIE ldscripts on armv7, hppa, and sh, so that there are symbolsPhilip Guenther
for the start+end of .{preinit,init,fini}_array sections when building PIE executables. ok kettenis@
2018-12-11Add PN_XNUM support to libbfd so objdump and gdb can handle corePhilip Guenther
dumps with many many segments. ok yasuoka@
2018-12-06Core files with >65535 sections have to use PN_XNUM and a section headerPhilip Guenther
to pass the real count, with a minimal .shstrtab segment for consistency. Also, add support for PN_XNUM to readelf. problem reported and testing by claudio@ ok kettenis@
2018-12-03Merge post-2.17 but pre-GPLv3 diffs that add support for DT_GNU_HASHPhilip Guenther
to ld and improve the readelf support: https://sourceware.org/ml/binutils/2006-07/msg00129.html https://sourceware.org/ml/binutils/2006-07/msg00181.html Disable the ld support on mips64, as its ABI requires a symbol ordering that conflicts with the requirements of DT_GNU_HASH. Tested on macppc, alpha, and sparc64 to verify operation with all three ELF word size combos testing help miod@ ok kettenis@
2018-11-29Fix various overflows in perlAndrew Fresh
Addresses: * CVE-2018-18311 (Perl RT #133204) * CVE-2018-18312 (Perl RT #133423) * CVE-2018-18313 (Perl RT #133192) * CVE-2018-18314 (Perl RT #131649)
2018-11-14Record an inter-library dependency on libcurses in libedit and libreadline,Stuart Henderson
avoiding runtime failures on architectures using ld.lld. Also add a note to libcurses shlib_version reminding about bumps (as done with libcrypto/libssl). Thanks guenther@ for suggestions of tests involving library bumps and jca@ for doing these tests and hint about DPADD. Looks good kettenis@, ok jca@
2018-11-13Add GNU_HASH #defines; improve readelf output for SHT_GNU_HASHPhilip Guenther
ok naddy@ jca@
2018-11-10Eliminate use of sbrk (was only used to print a diagnostic).Daniel Dickman
ok tb@
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@