| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
| |
This makes sure the compiler defines the _CALL_ELF pre-processor symbol
correctly.
ok mortimer@
|
| |
|
|
|
|
| |
powerpc. This matched what FreeBSD does.
ok patrick@
|
| |
|
|
| |
ok kettenis@
|
| |
|
|
|
|
|
|
| |
clang defaulted to -fomit-frame-pointer when optimizing PowerPC code
for Linux and NetBSD. Now do it for all systems, including OpenBSD.
This affects both 32-bit and powerpc64 code.
ok kettenis@
|
| |
|
|
|
| |
Prompted and tested by drahn@
ok deraadt@ drahn@ kettenis@ visa@
|
| |
|
|
|
|
| |
other clang platforms do.
ok jca@
|
| |
|
|
|
|
|
|
| |
Add these options from gcc to clang:
-maix-struct-return # return all structs in memory
-msvr4-struct-return # return small structs in r3/r4
ok mortimer@ jca@ deraadt@
|
| |
|
|
| |
"Go for it" kettenis@
|
| |
|
|
|
|
| |
to optimize the cache and UVM faulting behavior
ok kettenis@
|
| |
|
|
| |
ok kettenis@
|
| |
|
|
|
|
|
|
| |
lldb likes to look at argv[0] to figure out where it might find lldb-server,
but when we invoke lldb via $PATH this doesn't work, so fill in some helpers
to tell it where to look.
ok millert@
|
| |
|
|
|
|
| |
Fixes an assert when running lldb with DEBUG.
ok patrick@
|
| |
|
|
| |
with mortimer
|
| |
|
|
|
|
|
| |
Follows a similar model as NetBSD. Much help from patrick, kettenis and guenther.
lldb and lldb-server remain not installed by default.
ok patrick@
|
| |
|
|
|
|
|
|
|
|
| |
For this architecture we use separate retguard prologue and epilogue code
for static or PIC code. In the PIC case we use some additional code before
the retguard epilogue to recover the function start address and the GOT
pointer in order to get the per-function random cookie. Much thanks to
visa@ for suggestions and advice making it all work.
ok deraadt@ visa@
|
| |
|
|
|
|
|
|
| |
Change of behaviour in latest clang upgrade noticed by jsing@ during
the Go port update, where --print-libgcc-file-name is being used which
prints the compiler-rt path.
ok kettenis@
|
| |
|
|
|
|
|
| |
Tested in snaps and package builds
Tested on amd64 by naddy@
Tested on arm64 by patrick@
Tested on octeon by visa@
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
pieces of software that use the constraint if the compiler claims
to be compatible with GCC 4.2.1.
Note that the constraint was removed in GCC 4.4. The reason was that
'h' could generate code whose result is unpredictable. The underlying
reason is that the HI and LO registers are special, and the optimizer
has to be careful when choosing the order of HI/LO accesses. It looks
that LLVM has the needed logic.
|
| |
|
|
|
|
|
|
| |
for OpenBSD sparc64. The problem is that the integrated assembler is not
even able to compile the .S files in lib/csu or lib/libc so revert this
and use gas again. Fixes build issues with clang on sparc64.
Issue identified by jca@
OK deraadt@, patrick@, jca@
|
| |
|
|
|
|
| |
we don't need to do that again here.
From Brad
|
| |
|
|
|
|
|
|
|
| |
Prepared with help from jsg@ and mortimer@
Tested on amd64 by bcallah@, krw@, naddy@
Tested on arm64 by patrick@
Tested on macppc by kettenis@
Tested on octeon by visa@
Tested on sparc64 by claudio@
|
| | |
|
| | |
|
| |
|
|
|
| |
it will be there.
problem found by naddy@, "heck yeah" kettenis@
|
| |
|
|
|
|
| |
enabled.
ok visa@
|
| |
|
|
|
| |
Patch clang.rst such that "gmake -f Makefile.sphinx man" keeps working.
Using input from jsg@; OK patrick@; "no worries" deraadt@
|
| |
|
|
|
|
| |
Affects i386 and amd64 only.
ok deraadt@ kettenis@
|
| |
|
|
| |
specified; suggested by and ok kettenis@
|
| |
|
|
|
|
|
| |
stack protector. Fixes 'unused arguments' warning when this argument is
given.
Noticed by robert@, ok robert@
|
| |
|
|
|
|
| |
are close to release, so punt the change till after-release
easier for everyoned and especially naddy
ok tedu
|
| |
|
|
|
|
| |
optimization flags.
ok kettenis@ visa@
|
| |
|
|
| |
ok millert@
|
| |
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
- 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@
|
| |
|
|
| |
ok patrick@
|
| |
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
| |
FreeBSD/powerpc. From George Koehler.
ok millert@, deraadt@, visa@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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@
|
| | |
|
| | |
|
| |
|
|
|
| |
With fixes from mortimer@ (thanks!)
Tested by many, especially naddy@ (thanks!)
|
| | |
|
| |
|
|
|
|
| |
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@
|
| |
|
|
|
|
| |
is referenced from code being linked.
ok deraadt@, naddy@, guenther@
|
| |
|
|
| |
From upstream r335090. ok guenther@
|