summaryrefslogtreecommitdiffstats
path: root/lib/csu/alpha
AgeCommit message (Collapse)AuthorFilesLines
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
2018-11-22Make alpha less special: _dl_boot_bind() is written to completeguenther1-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@
2017-08-11_dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stubguenther1-5/+1
ok kettenis@
2017-01-19MD_START is now always ___start, so expand and eliminate itguenther1-2/+1
ok phessler@ deraadt@
2016-08-07alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, soguenther1-2/+3
save that and pass it to _dl_boot_bind() too
2016-03-20Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther1-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@
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/+12
With much assistance from miod@ ok deraadt@@
2014-12-27Static PIE support for alpha.kettenis1-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@
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@
2013-12-03Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros inguenther3-114/+23
the md_init.h files. Worked out with and ok miod@; ok matthew@
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/+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
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-10-06The recent change to bsd.own.mk to allow PICFLAG to be overridden madekurt1-3/+1
these previously ignored PICFLAG settings become active. Remove PICFLAG overrides to restore -fpic/-fPIC modes. In snaps for a week. okay drahn@
2005-09-25Revert temporary hack.kettenis2-131/+3
ok deraadt@
2005-08-04zap rcsid. Okay deraadt@, krw@espie1-5/+1
2004-10-21Temporary hack to make alpha build again.kettenis2-3/+131
ok drahn@, deraadt@
2004-01-08__init/__fini handling on ELF has not been correct. It is supposed todrahn2-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@
2003-08-25Define both _start and __start in crt0, all of the other architectures do.drahn1-2/+5
2003-05-30Fix dependancy building for ELF startup code. Changed Makefilesdrahn1-13/+24
to build startup code the same on all (ELF) archs. hppa ok mickey@
2003-02-28copy basename of argv[0] to bss for __progname, so that large stack smashderaadt1-2/+10
does not make propolice reporting ineffective; millert miod ok
2002-02-16Part 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.millert1-6/+6
2001-05-29fix the alpha after that last diff which was obviously not testedderaadt1-3/+3
2001-03-24Use "realinstall" to allow the framework to do other work if needed;tholo1-2/+2
path of least surprise. Ok millert@
2001-02-03Remove even more dead code.art1-28/+3
2001-02-03Schedule running of __fini in __init, not __start.art1-3/+2
2001-02-03Use crtbegin and crtend from common_elf.art3-129/+4
2001-02-03Don't define ECOFF_COMPAT. We're ELF.art1-5/+1
2001-01-31deconfuse include path. (XXX - this for my future hacks).art1-2/+2
2001-01-25This is not how we'll do dynamic libraries on alpha anyway.art2-102/+17
Zap dead code.
1999-08-20Fix RCS Idsniklas1-2/+2
1998-06-01consitancize with other archsmickey1-9/+5
1997-06-24Use OpenBSD tags and not SCCS or RCS Id tagstholo1-1/+5
1997-04-27COPY -> INSTALL_COPY and STRIP -> INSTALL_STRIPmillert1-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.
1996-11-13Sync with NetBSD, Add OpenBSD tags.niklas5-115/+382
1996-05-22machine/asm.h is sufficientderaadt1-8/+1
1995-12-21from netbsd; limit the flags that get passed to cppderaadt1-3/+3
1995-12-15from netbsd; do not override other CFLAGS settingsderaadt1-2/+2
1995-12-14from netbsd; fix profiling supportderaadt1-4/+4
1995-10-18initial import of NetBSD treederaadt2-0/+132