summaryrefslogtreecommitdiff
path: root/lib/csu
AgeCommit message (Collapse)Author
2012-09-08Reverse the order that ctors and dtors are run in accordance withMatthew Dempsky
GCC's documentation. Fixes GNU C++'s init_priority attribute. ok miod
2012-08-28Add __guard_local as a hidden symbol to ld.so, kernel, and everyMatthew Dempsky
executable and DSO (via crtbegin.c/crtbeginS.c). Not used yet, but needed before GCC can start emitting -fstack-protector code that uses them instead of __guard.
2012-08-22Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccPascal Stumpf
invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
2012-04-12the fpu control symbol on sh (__fpscr_values) suddenly becomes localJonathan Gray
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'tPhilip Guenthe
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@
2011-09-19Use long calls like we do on hppa, otherwise the function we want to callMark Kettenis
might be unreachable.
2011-08-19Make sure the stack is properly aligned for using SSE instructions. WhileMark Kettenis
our in-tree compiler will emit code to do this at the start of main(), other compilers might not do that. ok miod@
2011-07-09On hppa64 we need to use __gp instead of $global$.Mark Kettenis
2011-07-04enter ia64 for objTheo de Raadt
2011-07-04Add csu ia64 support.Paul Irofti
2011-04-20Implement correct prologue and epilogue for hppa64.Joel Sing
ok kettenis@
2011-03-31Make sure everything run from .init and .fini sections gets a properly alignedMark Kettenis
stack. ok fgsch@
2011-03-30Make sure everything run from .init and .fini sections gets a properly alignedMark Kettenis
stack. ok deraadt@, fgsch@
2010-12-24crtbeginS.o needs to be buit with -fPIC; with -fpic the relocations for theMark Kettenis
gcc3/4 exception handling related symbols will be truncated causing linker failures when building shared libraries. ok drahn@, deraadt@, miod@
2010-09-12Since the stack layout changes from gcc3 to gcc4, change the inline asm toMark Kettenis
deal with this. ok miod@
2010-05-01Sprinkle a few __used markers to prevent gcc4 from throwing away essentialMark Kettenis
bits of code and data. With this change gcc4 builds usable crt*.o on sparc64, other architectures probably need some more love. ok marco@, jsg@
2010-02-03Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentMiod Vallat
files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
2009-12-10Make sure to use 64 bit instructions in the assembly statements (addi -> daddi)Miod Vallat
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-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2009-07-14Don't specify mode(SI) attribute for __EH_FRAME_END__ as we haveJonathan Gray
32 bit ints on OpenBSD. ok kettenis@
2009-06-21fix rcs ids. ok sthen@Martynas Venckus
2009-06-16Do not break gcc -Z on powerpc. mprotect the got only if it is padded.Dale Rahn
Diff written and tweaked by kurt@ and myself. ok kurt@, now is agood time deraadt@
2009-04-13Add gcj java class registration hooks for gcc3 elf archs. From NetBSDKurt Miller
with minor differences. okay kettenis@ drahn@
2009-03-06Work-around a gcc3 -g bug causing debug ld.so to crash.Kurt Miller
okay kettenis@ drahn@
2009-02-04Tag ELF shared libraries as OpenBSD.Mark Kettenis
ok kurt@, drahn@, miod@
2009-01-14Re-enable pie support on macppc (still off by default but usableKurt Miller
again). Due to the way executable sections are loaded by the kernel, a one page .got section with the blrl instruction may be in the data cache and not flushed causing random crashes upon process startup. Flush the data cache before ___start() jumps there. Also mprotect the .got section to be read/exec instead of read/write/exec. ld.so knows how to cope and static binaries don't write to .got. written by and okay drahn@
2008-11-21revert -fpie for now, it produces crashing executablesOtto Moerbeek
2008-11-13fix rcs tag.Jonathan Gray
From patrick keshishian <sidster@boxsoft.com>
2008-11-11Compile crt0.o, crtbegin.o and crtend.o with -fpie/-fPIE. This requiresKurt Miller
gcc with pie support to be built first. ok kettenis@
2008-10-17adjust asm to be pic compatible. okay kettenis@Kurt Miller
2008-10-06The recent change to bsd.own.mk to allow PICFLAG to be overridden madeKurt Miller
these previously ignored PICFLAG settings become active. Remove PICFLAG overrides to restore -fpic/-fPIC modes. In snaps for a week. okay drahn@
2008-09-26Remove PICFLAG= setting, it is overridden in bsd.prog.mk. tested on landisk.Dale Rahn
Caught and ok kurt@
2008-07-28Remove separate pic versions of crt0, crtbegin, crtend. NextKurt Miller
release we are taking a different approach. Idea from kettenis@. okay kettenis@ weingart@
2008-06-25Build pic versions of crt0, crtbegin & crtend for amd64, i386, powerpc,Kurt Miller
sparc64. The rest will come later. okay drahn@ no objection miod@ "Get it in" deraadt@
2008-06-25Make pic compatiable. From and okay drahn@ no objection miod@Kurt Miller
"Slackers!" deraadt@
2008-01-29More read/write result checking fixes to avoid unsigned comparisons vsKenneth R Westerback
-1. ok henning@ beck@ ray@
2007-10-30avoid intermediate files with same name (ie. a.out) for parallel makeTheo de Raadt
ok miod
2007-10-17remove "unused variable" warningsCharles Longeau
tested by deraadt@ on a gcc2 arch looks ok ray@ ok deraadt@
2007-09-03Add __cxa_atexit() support for gcc3. This provides support for shared ↵Todd C. Miller
object destructors called at dlclose() time. Inspired by similar changes in FreeBSD and NetBSD.
2007-03-13Set the DN bit in the fpscr upon startup, to prevent faulting when loadingMiod Vallat
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 isMiod Vallat
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-11-09build obj in shDale Rahn
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2005-09-25Revert temporary hack.Mark Kettenis
ok deraadt@
2005-08-04zap rcsid. Okay deraadt@, krw@Marc Espie
2005-04-01hppa64 bits cloned form hppaMichael Shalayeff
2004-10-26Change __register_frame_info into a weakly defined symbol.Mark Kettenis
ok drahn@, pval@, deraadt@
2004-10-21Temporary hack to make alpha build again.Mark Kettenis
ok drahn@, deraadt@
2004-10-10Add support for DWARF2 exception handling.Mark Kettenis
ok drahn@, millert@
2004-09-10add mips64 to the list. ok derradt.Per Fogelstrom