summaryrefslogtreecommitdiffstats
path: root/lib/csu/mips64
AgeCommit message (Collapse)AuthorFilesLines
2020-10-20Use a trap instruction that unconditionally terminates the process.visa1-2/+2
OK deraadt@
2020-10-15crt0 MD _dl_exit() performs syscall to SYS_exit directly, but thenderaadt1-2/+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
2019-04-19Work around a limitation of clang integrated assembler on mips64.visa1-1/+4
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@
2019-03-23Separate symbol name and type with a comma for consistency andvisa1-2/+2
to make clang happier. No binary change with gas.
2017-08-11_dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stubguenther1-7/+1
ok kettenis@
2016-08-07Teach mips64 to pass &_DYNAMIC to _dl_boot_bind().guenther1-1/+3
mips64be testing by 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@
2016-03-13crt0.c is already setting environ, so don't set it in MD_START_SETUPguenther1-2/+2
ok kettenis@ mpi@
2015-09-01In static binaries, invoke kbind() once to disable it.guenther1-1/+11
With much assistance from miod@ ok deraadt@@
2015-02-07argc is passed as a long by the kernel, define it as such to match whatmiod1-2/+2
other ports do.
2015-01-01Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gpmiod1-2/+4
value, which we have no use for. ok kettenis@
2014-12-27Static PIE for mips64. Still something not quite right as a full make buildkettenis1-1/+44
fails. ok kurt@
2014-12-23do not expose "ra" to cpp because it muddles up the .c code above.deraadt1-7/+5
instead handle it internally as $ra solution from kettenis, ok guenther
2014-11-12Merge Makefiles, moving the build up a level and putting the CPU-specificguenther1-60/+0
build flags into conditionals in the Makefile, fixing a few inconsistencies in the process. \o/ miod@
2014-02-22Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is alignedmiod1-1/+3
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.
2013-12-23Add assembly code to set up the arguments for the common C startup code. Thiskettenis1-29/+19
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@
2013-12-23Sync Makefile with what other platforms do; makes dependency tracking actuallykettenis1-14/+45
work. ok deraadt@, guenther@
2013-12-04correct frame handlingderaadt1-8/+3
with and ok guenther
2013-12-03Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros inguenther3-213/+54
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-8/+2
Delete unused #ifndef SCRT0 conditionals. 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@
2010-09-12Since the stack layout changes from gcc3 to gcc4, change the inline asm tokettenis1-1/+5
deal with this. ok miod@
2009-12-10Make sure to use 64 bit instructions in the assembly statements (addi -> daddi)miod1-8/+4
in the prologue; this gives a chance for binaries loaded with their stack over 2GB virtual, to run. Who's your daddi now?
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-3/+3
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
2005-08-04zap rcsid. Okay deraadt@, krw@espie1-5/+1
2004-09-09Shared libs now works. Changes here for ABI64.pefo2-30/+59
2004-08-23kill useless __main() symbol which clashes w/ certain evil software inpvalchev1-4/+2
the ports tree; ok pefo
2004-08-06csu stuff for sgi et alpefo3-0/+308