summaryrefslogtreecommitdiffstats
path: root/lib/csu/mips64 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use a trap instruction that unconditionally terminates the process.visa2020-10-201-2/+2
| | | | OK deraadt@
* crt0 MD _dl_exit() performs syscall to SYS_exit directly, but thenderaadt2020-10-151-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
* use symbolic SYS_exit instead of the value 1deraadt2020-10-141-2/+2
| | | | ok kettenis
* Work around a limitation of clang integrated assembler on mips64.visa2019-04-191-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@
* Separate symbol name and type with a comma for consistency andvisa2019-03-231-2/+2
| | | | | | to make clang happier. No binary change with gas.
* _dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stubguenther2017-08-111-7/+1
| | | | ok kettenis@
* Teach mips64 to pass &_DYNAMIC to _dl_boot_bind().guenther2016-08-071-1/+3
| | | | mips64be testing by deraadt@
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-201-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@
* crt0.c is already setting environ, so don't set it in MD_START_SETUPguenther2016-03-131-2/+2
| | | | ok kettenis@ mpi@
* In static binaries, invoke kbind() once to disable it.guenther2015-09-011-1/+11
| | | | | With much assistance from miod@ ok deraadt@@
* argc is passed as a long by the kernel, define it as such to match whatmiod2015-02-071-2/+2
| | | | other ports do.
* Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gpmiod2015-01-011-2/+4
| | | | value, which we have no use for. ok kettenis@
* Static PIE for mips64. Still something not quite right as a full make buildkettenis2014-12-271-1/+44
| | | | | | fails. ok kurt@
* do not expose "ra" to cpp because it muddles up the .c code above.deraadt2014-12-231-7/+5
| | | | | instead handle it internally as $ra solution from kettenis, ok guenther
* Merge Makefiles, moving the build up a level and putting the CPU-specificguenther2014-11-121-60/+0
| | | | | | | build flags into conditionals in the Makefile, fixing a few inconsistencies in the process. \o/ miod@
* Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is alignedmiod2014-02-221-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.
* Add assembly code to set up the arguments for the common C startup code. Thiskettenis2013-12-231-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@
* Sync Makefile with what other platforms do; makes dependency tracking actuallykettenis2013-12-231-14/+45
| | | | | | work. ok deraadt@, guenther@
* correct frame handlingderaadt2013-12-041-8/+3
| | | | with and ok guenther
* Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros inguenther2013-12-033-213/+54
| | | | | | the md_init.h files. Worked out with and ok miod@; ok matthew@
* mips64 no longer uses scrt0.o, and it was identical to crt0.o anyway.guenther2013-12-011-8/+2
| | | | | | Delete unused #ifndef SCRT0 conditionals. ok miod@
* Pass install the -S option to avoid a window where the target isn'tguenther2011-11-081-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@
* Since the stack layout changes from gcc3 to gcc4, change the inline asm tokettenis2010-09-121-1/+5
| | | | | | deal with this. ok miod@
* Make sure to use 64 bit instructions in the assembly statements (addi -> daddi)miod2009-12-101-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?
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-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
* zap rcsid. Okay deraadt@, krw@espie2005-08-041-5/+1
|
* Shared libs now works. Changes here for ABI64.pefo2004-09-092-30/+59
|
* kill useless __main() symbol which clashes w/ certain evil software inpvalchev2004-08-231-4/+2
| | | | the ports tree; ok pefo
* csu stuff for sgi et alpefo2004-08-063-0/+308