summaryrefslogtreecommitdiffstats
path: root/lib/csu/sh
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15crt0 MD _dl_exit() performs syscall to SYS_exit directly, but thenderaadt1-1/+2
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
2020-10-14use symbolic SYS_exit instead of the value 1deraadt1-2/+2
ok kettenis
2017-08-11_dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stubguenther1-8/+1
ok kettenis@
2017-01-19MD_START is now always ___start, so expand and eliminate itguenther1-4/+1
ok phessler@ deraadt@
2016-03-20Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther1-10/+1
move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
2015-09-01In static binaries, invoke kbind() once to disable it.guenther1-1/+10
With much assistance from miod@ ok deraadt@@
2014-12-30self-relocating crt0 bits for sh, and enable static pie by default. With somemiod1-6/+67
archdep.h help from kettenis@
2014-11-12Merge Makefiles, moving the build up a level and putting the CPU-specificguenther1-59/+0
build flags into conditionals in the Makefile, fixing a few inconsistencies in the process. \o/ miod@
2014-04-18It's been a quarter century: we can assume volatile is present with that name.guenther1-2/+2
2013-12-03Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros inguenther3-125/+26
the md_init.h files. Worked out with and ok miod@; ok matthew@
2013-12-01mips64 no longer uses scrt0.o, and it was identical to crt0.o anyway.guenther1-3/+1
Delete unused #ifndef SCRT0 conditionals. ok miod@
2013-11-10The kernel and ld.so have passed 0 in r7 for use as the cleanupguenther1-19/+5
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@
2012-12-05Remove excessive sys/cdefs.h inclusionderaadt1-2/+1
ok guenther millert kettenis
2012-04-12the fpu control symbol on sh (__fpscr_values) suddenly becomes localjsg1-2/+5
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@
2011-11-08Pass install the -S option to avoid a window where the target isn'tguenther1-2/+2
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@
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-2/+1
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2008-11-11Compile crt0.o, crtbegin.o and crtend.o with -fpie/-fPIE. This requireskurt1-7/+7
gcc with pie support to be built first. ok kettenis@
2008-09-26Remove PICFLAG= setting, it is overridden in bsd.prog.mk. tested on landisk.drahn1-4/+1
Caught and ok kurt@
2007-03-13Set the DN bit in the fpscr upon startup, to prevent faulting when loadingmiod1-1/+4
denormals. This is recommended by the manual, and is necessary for the gdb testsuite to pass; found by, discussed with, and ok kettenis@ (be sure to make includes before recompiling csu)
2007-03-02Move landisk to hardware floating point. At the moment the FPU context ismiod1-1/+9
always saved upon context switches, as FPU registers are heavily used for long long computations (don't ask). Gcc default to -m4. Credits to drahn@ otto@ and deraadt@ for feedback and help testing. Upgrade procedure if you don't want to use the damn snapshots: - build and install new kernel, reboot off it - build new gcc, do not install it yet - make includes - install new gcc - build and install lib/csu and lib/libc - make build
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming frommiod3-0/+253
NetBSD.