Age | Commit message (Collapse) | Author |
|
Fixes behavior with current clang, which marks the symbol as GLOBAL
instead of WEAK. LLVM change: https://reviews.llvm.org/D90108
base-gcc is unaffected. Keep asm(".weak") for gcc3 until a cleanup can
be tested there.
Initial diff from mortimer@, input and ok kettenis@, ok guenther@
|
|
only initializing the variables we need to, and switching to a
"while < end-of-array" style for DT_REL/RELA processing
ok drahn@ kettenis@
|
|
split ld.so/boot.c in 2019:
* delete extraneous #includes
* delete jmprel handling on non-hppa
* delete RELOC_GOT() and DT_PROC bits on non-mips64
ok visa@
|
|
ok mlarkin@
|
|
correctly and do not overwrite it in csu.
allows most ld.so regressions to pass
confirmed by jsg@, ok kettenis
|
|
Includes fixes pointed out by kettenis, jsg, naddy
|
|
OK deraadt@
|
|
("permanently undefined")
ok deraadt@ kettenis@
|
|
some of these functions were returning. That makes the +1word address
a fairly strong and easily located gadget. Put a hard-trap
instruction after the syscall. This remains a gadget for 'terminal
system' calls (such as execve), but hey that's why we have pledge w/o
"exec" throughout the tree.
Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the
safest of the bunch, not that this helps anyone.
ok kettenis
|
|
the 0x400 %g2 syscall method
ok kettenis
|
|
ok kettenis
|
|
ok patrick@, drahn@
|
|
|
|
This probably should be backed out after fully debugged, vector
instructions caused problems with debug configuration.
|
|
Determine location of toc based on PC relative location and load into %r2
|
|
calls to libc in the process boot code that might not work before things
like the GOT are set up.
Suggested by deraadt@ ok visa@
|
|
problems as 64-bit models. To resolve the syscall speculation, as a first
step "nop; nop" was added after all occurances of the syscall ("swi 0")
instruction. Then the kernel was changed to jump over the 2 extra instructions.
In this final step, those pair of nops are converted into the speculation-blocking
sequence ("dsb nsh; isb").
Don't try to build through these multiple steps, use a snapshot instead.
Packages matching the new ABI will be out in a while...
ok kettenis
|
|
problems as 64-bit models. For the syscall instruction issue, add nop;nop
after swi 0, in preparation for jumping over a speculation barrier here later.
|
|
a syscall, replace the double nop with a dsb nsh; isb; sequence which
stops the CPU from speculating any further. This fix was suggested
by Anthony Steinhauser.
ok deraadt@
|
|
The will be replaced by a speculation barrier as soon as we teach the
kernel to skip over these two instructions when returning from a
system call.
ok patrick@, deraadt@
|
|
ok visa@
|
|
stop building the csu code with -fpie on that platform.
ok guenther@, visa@
|
|
- put functions and data which are only used before calling the executable's
start function into their own page-aligned segments for unmapping
(only done on amd64, arm64, armv7, powerpc, and sparc64 so far)
- pass .init_array and .preinit_array functions an addition argument which
is a callback to get a structure which includes a function that frees
the boot text and data
- sometimes delay doing RELRO processing: for a shared-object marked
DF_1_INITFIRST do it after the object's .init_array, for the executable
do it after the .preinit_array
- improve test-ld.so to link against libpthread and trigger its initialization
late
libc changes to use this will come later
ok kettenis@
|
|
executables the TIB and __progname are set up before they can be used.
problem noted by ori@
ok millert@ kettenis@
|
|
The assembler does not handle undeclared local symbols properly
and generates R_MIPS_CALL16 relocations where it should generate
local GOT references. For now, get along with the problem by
declaring local symbols where necessary.
OK kettenis@ guenther@
|
|
on mips64. They need relocation and consequently cannot be used
in that function.
OK kettenis@
|
|
to make clang happier.
No binary change with gas.
|
|
As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.
Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.
|
|
declared static.
OK guenther@
|
|
ok kettenis@
|
|
relocation of ld.so's GOT without using it, so _reloc_alpha_got()
merely made the call to _dl_boot_bind() from asm simpler...while
itself being a call that required special handling.
diff and muild baking by miod@
ok guenther@
|
|
That part is not needed with a PIE toolchain, but until gcc 4 on m88k
receives enough fixes to produce as good code as gcc 3, the bits in
r1.5 are still required.
This fixes miniperl does not work correctly while building perl on m88k.
Diff is suggested by Miod Vallat, tested by him and me, ok guenther@
|
|
not the address of its GOT entry. The current code mixed the high bits of
the GOT entry address with the low bits of the true address. This only
worked by accident for small binaries where _DYNAMIC and its GOT entry
happen to reside on the same page.
ok guenther@, mortimer@
|
|
Convert __cerror to hidden visibility.
from miod@
|
|
problem noted by deraadt@
ok espie@
|
|
ok kettenis@
|
|
okay millert@
|
|
implementations.
ok guenther@
|
|
Necessary (but perhaps not suffcient) to build large binaries on arm.
ok guenther@
|
|
ok kettenis@
|
|
ok krw@ guenther@
|
|
|
|
ok kettenis@
|
|
Mark __init() as hidden
ok kettenis@ deraadt@
|
|
|
|
ok kettenis@ deraadt@
|
|
sections as extern hidden arrays of indefinite size, so that the compiler
(well, clang) doesn't believe it knows the exact contents and thus optimize
things into infinite loops. Actually set the symbols to be in the sections
and insert the leading and trailing values via __asm().
Problem pointed out by patrick@
testing and ok kettenis@
|
|
ok phessler@ deraadt@
|
|
|
|
the extern declaration of __got_{start,end}.
ok guenther@
|