summaryrefslogtreecommitdiffstats
path: root/lib/csu/alpha (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Make alpha less special: _dl_boot_bind() is written to completeguenther2018-11-221-8/+6
| | | | | | | | | 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@
* _dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stubguenther2017-08-111-5/+1
| | | | ok kettenis@
* MD_START is now always ___start, so expand and eliminate itguenther2017-01-191-2/+1
| | | | ok phessler@ deraadt@
* alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, soguenther2016-08-071-2/+3
| | | | save that and pass it to _dl_boot_bind() too
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-201-12/+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/+12
| | | | | With much assistance from miod@ ok deraadt@@
* Static PIE support for alpha.kettenis2014-12-271-6/+44
| | | | | | | | | | | | | This adds alpha-specific first-pass GOT relocation code to boot.h. The assembly code is pure magic. The numeric register names don't make it easier to understand (or compare with the equivalent ld.so code). Unfortunately the assembler only understands a few symbolic register names. Renames the crt0.o entry point to __start. Our compiler was already using __start and the linker will soon follow. ok kurt@
* 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@
* Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros inguenther2013-12-033-114/+23
| | | | | | the md_init.h files. Worked out with and ok miod@; ok matthew@
* 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@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-2/+2
| | | | | | | 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
* Compile crt0.o, crtbegin.o and crtend.o with -fpie/-fPIE. This requireskurt2008-11-111-7/+7
| | | | | | gcc with pie support to be built first. ok kettenis@
* The recent change to bsd.own.mk to allow PICFLAG to be overridden madekurt2008-10-061-3/+1
| | | | | | | these previously ignored PICFLAG settings become active. Remove PICFLAG overrides to restore -fpic/-fPIC modes. In snaps for a week. okay drahn@
* Revert temporary hack.kettenis2005-09-252-131/+3
| | | | ok deraadt@
* zap rcsid. Okay deraadt@, krw@espie2005-08-041-5/+1
|
* Temporary hack to make alpha build again.kettenis2004-10-212-3/+131
| | | | ok drahn@, deraadt@
* __init/__fini handling on ELF has not been correct. It is supposed todrahn2004-01-082-2/+65
| | | | | | be a section which code stubs (branches) can be added to initialize/destructor This adds MD stubs to allow this to operate as expected. should fix wine and behave according to ELF specs. ok miod@
* Define both _start and __start in crt0, all of the other architectures do.drahn2003-08-251-2/+5
|
* Fix dependancy building for ELF startup code. Changed Makefilesdrahn2003-05-301-13/+24
| | | | to build startup code the same on all (ELF) archs. hppa ok mickey@
* copy basename of argv[0] to bss for __progname, so that large stack smashderaadt2003-02-281-2/+10
| | | | does not make propolice reporting ineffective; millert miod ok
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-6/+6
|
* fix the alpha after that last diff which was obviously not testedderaadt2001-05-291-3/+3
|
* Use "realinstall" to allow the framework to do other work if needed;tholo2001-03-241-2/+2
| | | | path of least surprise. Ok millert@
* Remove even more dead code.art2001-02-031-28/+3
|
* Schedule running of __fini in __init, not __start.art2001-02-031-3/+2
|
* Use crtbegin and crtend from common_elf.art2001-02-033-129/+4
|
* Don't define ECOFF_COMPAT. We're ELF.art2001-02-031-5/+1
|
* deconfuse include path. (XXX - this for my future hacks).art2001-01-311-2/+2
|
* This is not how we'll do dynamic libraries on alpha anyway.art2001-01-252-102/+17
| | | | Zap dead code.
* Fix RCS Idsniklas1999-08-201-2/+2
|
* consitancize with other archsmickey1998-06-011-9/+5
|
* Use OpenBSD tags and not SCCS or RCS Id tagstholo1997-06-241-1/+5
|
* COPY -> INSTALL_COPY and STRIP -> INSTALL_STRIPmillert1997-04-271-2/+2
| | | | | | | This fixes namespace problems where STRIP is sometimes used as the name of the strip(1) to use and other times used as the flag to send install(1) when stripping (or not). COPY doesn't have this problem (yet) but was poorly named.
* Sync with NetBSD, Add OpenBSD tags.niklas1996-11-135-115/+382
|
* machine/asm.h is sufficientderaadt1996-05-221-8/+1
|
* from netbsd; limit the flags that get passed to cppderaadt1995-12-211-3/+3
|
* from netbsd; do not override other CFLAGS settingsderaadt1995-12-151-2/+2
|
* from netbsd; fix profiling supportderaadt1995-12-141-4/+4
|
* initial import of NetBSD treederaadt1995-10-182-0/+132