summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
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-24Size static array correctly for the numerically highest index used toChristian Weisgerber
access it. ok deraadt@ kettenis@
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@
2018-10-22When checking out certain commits by date, cvs got confused. IfAlexander Bluhm
there is a vendor branch and a commit on top of it, revision 1.1 was taken instead of the vendor branch. To fix this, compare the vendor date with the current node, and not with the command line date. OK deraadt@
2018-10-21When merging sections into the output, lld tries to adjust the alignment ofMark Kettenis
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@
2018-10-21Enable the integrated assembler on mips64.Visa Hankala
Upstream references: https://reviews.llvm.org/D31557 https://reviews.llvm.org/D48515 OK kettenis@
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@
2018-10-05lldb after release, reasons.Theo de Raadt
2018-10-04Add infrastructure to compile and link LLDB. Inspecting core filesPatrick Wildt
works, but actually running stuff probably won't. ok kettenis@
2018-09-29Allow preemption of functions with protected visibility. Disallowing thisMark Kettenis
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@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2018-09-18Backport support for option -a to addr2line, which will display each addressanton
given as input before the resolved source location. This change was introduced to bintutils after the switch from GPLv2 but the author Tristan Gingold granted me permission relicense the diff under GPLv2; thanks! Taken as is from binutils commit be6f64938f985dfb0eaa2107b99f193bb865ce04 This option is used by the syzkaller kernel fuzzer to produce a human readable representation of the coverage collected by kcov. ok deraadt@ jca@ visa@
2018-09-14Pass -L/usr/lib to the linker in preparation for switching to lld, whichChristian Weisgerber
does not have a default search path. ok kettenis@ jsg@
2018-09-14Pass CC/CFLAGS/LDFLAGS to the configure script. ok millert@Christian Weisgerber
2018-09-11Fix --exclude-libs option. Based on code already committed upstream.Mark Kettenis
tested by naddy@
2018-09-09Teach binutils how to assemble INVPCID and how to disassemblePhilip Guenther
INV{EPT,VPID,PCID} ok mlarkin@
2018-08-16When installing the link to rcs2log, set the owner on the link itselfTodd C. Miller
and not the file it points to. OK deraadt@ tb@
2018-08-12Add retguard for arm64.mortimer
ok deraadt@
2018-08-12Refactor retguard to make adding additional arches easier.mortimer
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2018-07-28Add -fno-ret-protector for arm64.mortimer
Prompted by deraadt
2018-07-26Add infrastructure to install lld as the default linker. The old GNU linkerMark Kettenis
will be installed as /usr/bin/ld.bfd on supported systems. This allows users to fall back on the old linker by using the -fuse-ld=bfd option on systems where lld is the default linker. Switch armv7 to use lld as the default linker. On arm64 we already use lld as the default linker. Other platforms will keep using the GNU linker for now. ok patrick@, deraadt@, phessler@
2018-07-20inform that diagnostics in functions won't work, but don't error outMarc Espie
flatly. this will help sparc64 compile code without needing to patch away recent pragma diagnostic use. problem found by landry@ okay kettenis@, guenther@
2018-07-11do not pick up groff from /usr/local/bin in configure, noticed by benno@;Christian Weisgerber
ok benno@ jca@
2018-07-10Fix a few, but not all, clang warnings: Use "%s" to print modifiableTheo Buehler
strings, add a couple of braces, ansify a few functions, add and remove a few extra parens. ok jcs
1998-02-22Latest version from CyclicThorsten Lockert
1995-12-19raw import of cvs-1.6Theo de Raadt
2018-07-10Drop the ignored selectors (tf_[defg]s) from the trap and interrupt frames.Philip Guenther
ok mlarkin@ deraadt@ mpi@ kettenis@
2018-07-08Explicitly pass -L/usr/lib to the linker. Needed for switching to lld(1)Mark Kettenis
as the default linker on armv7. ok espie@
2018-07-03Make intrframe the exact same size as trapframe: instead of pushingPhilip Guenther
the PPL on top, store it where trapframe puts the trap number. This makes interrupt handlers get called with the correct stack alignment. Also, document the use of if_err to differentiate resumed/recursed interrupts from 'real' ones. tested in snaps ok deraadt@
2018-06-22Emit trap alignment between basic blocks that are unrechable viamortimer
fallthrough. Avoids unnecessary jmp instructions in the middle of functions and makes disassembly nicer to read. ok guenther@ mlarkin@ deraadt@
2018-06-19Avoid Archive::Tar directory traversalAndrew Fresh
Addresses CVE-2018-12015 From Silamael <silamael () coronamundi ! de> Original bug reports: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900834 https://rt.cpan.org/Public/Bug/Display.html?id=125523 Original commit with the fix: https://github.com/jib/archive-tar-new/commit/ae65651eab053fc6dc4590dbb863a268215c1fc5 OK bluhm@, they should already be committed! deraadt@
2018-06-12Put the new retguard symbols in their own section,Philip Guenther
'.openbsd.randomdata.retguard', to make them easier to work with in the kernel hibernate code. ok mortimer@ deraadt@
2018-06-12Merge '.openbsd.randomdata.*' sections into a single '.openbsd.randomdata'Philip Guenther
section when linking, as we do when using ld from binutils. ok mortimer@ deraadt@
2018-06-07Pass -nopie to the linker when -pg is specified to make theYASUOKA Masahiko
profiler(gprof) work properly. ok mpi
2018-06-07Remove unused variable.mortimer
Spotted by Nan Xiao.
2018-06-06Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer
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@
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@
2018-06-03Add ret protctor options as no-ops.mortimer
2018-06-03Work around a bug where discarding the .ARM.exidx section in the armv7 kernelMark Kettenis
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@
2018-05-21Add --localize-hidden option to objcopy.Mark Kettenis
From Sebastien Marie
2018-05-05Switch armv7 to the "softfp" floating-point ABI. The ABI is identical toMark Kettenis
the "soft" floating-point ABI but this does allow the compiler to generate FPU instructions. ok deraadt@
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2018-04-30The trapframe layout is no longer exactly the same as the sigcontextPhilip Guenther
layout. Simplify how we identify which frames have trapframes while here. ok kettenis@
2018-04-28Add a clang pass that identifies potential ROP gadgets and replaces ROPmortimer
friendly instructions with safe alternatives. This initial commit fixes 3 instruction forms that will lower to include a c3 (return) byte. Additional problematic instructions can be fixed incrementally using this framework. ok deraadt@
2018-04-24Make our ancient binutils recognize .gnu.hash sections such that our toolsMark Kettenis
don't barf on binaries created by ld.lld(1). From FreeBSD. ok millert@, deraadt@, guenther@