| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rcsu0.o where the initial 'r' is for relocatable. rcsu0.o performs
self-relocation on static pie binaries by calling a slightly modified
copy of ld.so's _dl_boot_bind() in boot.h.
The first arch implementatation is also included for amd64 where
__start calls _dl_boot_bind() and then calls ___start(). Includes
parts from kettenis@ to help get R_X86_64_64 relocations working
and proper handling for undefined weak symbols.
This is the first part of several to get static pie self-relocating
binaries working. binutils, gcc and kernel changes are forthcoming
to complete the solution, then per-arch implementations are needed
for MD_RCRT0_START in csu.
okay kettenis@ pascal@ deraadt@
|
| |
|
|
|
|
|
|
| |
special case; no binary change
ok kettenis@
|
|
|
|
| |
ok miod@ deraadt@
|
|
|
|
|
|
|
| |
build flags into conditionals in the Makefile, fixing a few inconsistencies
in the process.
\o/ miod@
|
|
|
|
| |
ok miod@
|
| |
|
|
|
|
|
|
|
| |
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
right __dso_handle and have dlopen'ed shared objects run their atexit handlers
when they get unloaded. This is what Linux does, and several ports depend on
this behaviour (and will crash upon exit without this chang).
Based on an earlier diff from matthew@
Tested by ajacoutot@
ok deraadt@
|
|
|
|
|
|
|
| |
means we no longer rely on how the C compiler sets up the initial stack frame
and allows us to get rid of MD_NO_CLEANUP.
ok deraadt@, guenther@
|
|
|
|
|
|
| |
work.
ok deraadt@, guenther@
|
| |
|
|
|
|
|
|
| |
defined and we don't think ld.so has already done the TCB setup.
ok and much discussion miod@
|
|
|
|
| |
with and ok guenther
|
|
|
|
|
|
| |
the md_init.h files.
Worked out with and ok miod@; ok matthew@
|
|
|
|
|
|
| |
Delete unused #ifndef SCRT0 conditionals.
ok miod@
|
|
|
|
|
|
|
|
|
|
| |
callback for about a year, so it's safe to make __start() pass that
as the cleanup argument to ___start(), and have *that* conditionally
pass it to atexit(). Eliminate the no-longer-used obj and ps_strings
arguments to position things correctly, simplifying the ASM wrapper
slightly.
ok kettenis@ miod@; testing patrick@
|
|
|
|
|
|
|
|
|
| |
callback for about a year, so it's safe to make __start() treat
that as the cleanup argument and conditionally pass it to atexit().
Eliminate the no-longer-used obj and ps_strings arguments to position
things correctly, which lets us eliminate the ASM wrapper completely.
ok kettenis@ miod@
|
|
|
|
|
|
|
|
| |
for about a year, so it's safe to add the test and atexit() call.
While here, drop the no-longer-used obj and ps_strings and the
asm to set those up, switch from sys/param.h to limits.h, and ANSIfy.
ok kettenis@
|
| |
|
| |
|
| |
|
|
|
|
|
| |
assembler instructions, and cope with the few changes in return values
location.
|
| |
|
| |
|
| |
|
|
|
|
| |
tested by benno@
|
|
|
|
| |
ok guenther@
|
| |
|
|
|
|
|
|
|
| |
use SSE instructions. In principle we should be able to rely on the stack to
be aligned properly, but the i386 calling convention makes this rather fragile.
ok guenther@, deraadt@
|
|
|
|
| |
ok kurt@
|
|
|
|
|
|
| |
silently crash when running constructors. Tested by landry@.
ok beck@
|
|
|
|
| |
ok guenther millert kettenis
|
|
|
|
| |
ok kurt@
|
|
|
|
|
|
| |
GCC's documentation. Fixes GNU C++'s init_priority attribute.
ok miod
|
|
|
|
|
|
| |
executable and DSO (via crtbegin.c/crtbeginS.c). Not used yet, but
needed before GCC can start emitting -fstack-protector code that uses
them instead of __guard.
|
|
|
|
|
|
|
| |
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.
ok matthew@, conceptually ok kurt@
|
|
|
|
|
|
|
| |
instead of global with gcc4 and this ends up breaking things in hard
to debug ways. So move the definition to csu instead of libgcc.
ok miod@
|
|
|
|
|
|
|
| |
executable (by mode or content), which can trip up builds with 'make -j'
(The generic fix is in share/mk/*; some Makefiles have their own INSTALL lines)
ok millert@ deraadt@
|
|
|
|
| |
might be unreachable.
|
|
|
|
|
|
|
| |
our in-tree compiler will emit code to do this at the start of main(), other
compilers might not do that.
ok miod@
|
| |
|
| |
|
| |
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
stack.
ok fgsch@
|
|
|
|
|
|
| |
stack.
ok deraadt@, fgsch@
|
|
|
|
|
|
|
| |
gcc3/4 exception handling related symbols will be truncated causing linker
failures when building shared libraries.
ok drahn@, deraadt@, miod@
|
|
|
|
|
|
| |
deal with this.
ok miod@
|