Commit Graph

58 Commits

Author SHA1 Message Date
thorpej fd9112a780 Build and install crtfm.o (sets the Alpha FP_C in a way that GCC's
-ffast-math on Alpha expects).
2002-01-14 01:31:58 +00:00
thorpej 24ca47c4d5 * Use the new ALPHA_SET_FP_C sysarch call.
* Provide an internal sysarch entry point, so that this works
  with statically-linked programs.
2002-01-14 01:31:00 +00:00
thorpej 655925395a Support for the GCC "-ffast-math" option on the Alpha. 2002-01-13 20:05:42 +00:00
thorpej 4abcdae85e Enable the new (working) .init/.fini magic. 2001-07-17 03:56:48 +00:00
ross 2d62241cb9 Reorganization of crtbegin/crtend.
o  Primary mod: alpha and i386 code for .init and .fini section fallthroughs
o  Actual fallthru is not yet enabled, see csu/{alpha,i386_elf}/Makefile
o  When enabled, should fix bin/12865 & should fix at least one WINE bug,
   see http://www.winehq.com/hypermail/wine-devel/2001/05/0021.html
o  Also, removed the function pointer hack put in to prevent gcc from
   incorrectly attempting to do short calls over section boundaries,
   on some architectures, rather, simply simply move ctors() and dtors()
   into .init and .fini.
Other notes.
o  Our crtbegin.c and crtend.c were completely in C, despite
   the fact that .init and .fini section fallthroughs require machine code.
   These modules implement the gnu ctors/dtors mechanism directly, eliminating
   in part the need for the elf .init/.fini section fallthrough. However,
   if we ever want to use the gnu-provided constructor support, we need to
   do the fallthrough, at least one program (WINE) apparently uses the
   feature independently, and other compilers may depend on the mechanism.
o  It is amusing that the previous NetBSD _init() and _fini() were put
   into the .init and .fini sections, because nothing is gained over
   plain .text if they don't fall through. Cargo cult!
o  Other elf ports will need to copy the alpha and i386 example mods.
2001-05-11 22:44:14 +00:00
mycroft 94581370f5 The ELF ABI declares that argc must fill an `argument slot'. Make it so.
For __sparc_v9__ only, do a hack to make executables work temporarily before
and after the kernel is switched.
2000-07-26 15:40:07 +00:00
mycroft 209e309de1 Always dereference argc as an int. 2000-07-26 02:11:44 +00:00
cgd db755e7c76 sweep of my licenses (userland files w/o only my copyright) for
consistency.  (no functional changes)
2000-06-14 17:24:02 +00:00
cgd d220ca5ba3 fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
2000-06-14 06:48:47 +00:00
thorpej cb3c96c11e Pull together common Makefile fragments for ELF crt0 files, and use it
across the board.
1999-03-20 00:32:40 +00:00
thorpej 0d19945594 Collect the top parts of the ELF crt0.c files into a common header, and
use it across the board.

crt0.c now contains stuff that REALLY IS machine-dependent, or stuff that
is completely intermingled in machdep code (and thus can't be separated
easily).
1999-03-20 00:13:51 +00:00
thorpej 3f196ccbc8 Put a good chunk of code common to all ELF crt0.c files into a common
location, and use it.
1999-03-19 23:34:49 +00:00
thorpej 4216363b47 Move crtbegin.c and crtend.c from alpha subdir to common_elf subdir via
repository copy, remove all redundant copies of these files, and make all
ELF platforms use the common versions.
1999-03-19 23:16:15 +00:00
thorpej 84065de42a Not used. 1999-03-19 23:00:16 +00:00
kleink 198e9a2784 s/rtld_setup/_rtld_setup/ to move it out of the user's name space. 1999-03-08 10:49:08 +00:00
pk 015fada66a Assign my copyrights to TNF. 1998-09-05 13:20:07 +00:00
thorpej 4d2424a47a We need <sys/param.h> because sysident.h requires the `NetBSD' constant. 1998-07-27 21:46:49 +00:00
mycroft f5e7ca07dd These all need types.h. 1998-07-25 04:45:04 +00:00
mycroft d005dcbce0 Don't pull in param.h (and therefore don't pull in unistd.h). 1998-07-25 04:34:12 +00:00
cgd a21bdbd076 can't include crt.h; it's not gone! 1998-05-06 20:58:34 +00:00
ross 03363828ac No longer needed, calls begin crtbegin & crtend were just removed. 1998-05-06 20:46:56 +00:00
ross cbd1bb578a Sigh, don't make global calls in repeated sharedlib components. It blows
away the dynamic loader.
1998-05-06 20:45:54 +00:00
ross ab2c05e5a3 Eliminate incorrect gcc-generated cross-section bsr's by calling the static
constructor/destructor dispatcher via a function pointer protected from
constant propagation. Also, create (presently unused) .S files that solve
the same problem and in addition allow in-line .init section and .fini
section code. This is too big a mod for a 3.2 pullup, however.
1998-05-06 05:32:08 +00:00
ross bb44cd0d28 Put the vanilla versions of these into CVS so that Those Who Come Later
can see the hand assembly mods in a cvs diff rather than having to start over
from the prototype .c files. (Although these will also be available.)
1998-05-06 00:59:18 +00:00
cgd c0ac8bae67 GC alpha's ECOFF_TOOLCHAIN make variable, and related bits. Nobody
should be using an ECOFF toolchain on NetBSD/alpha any more.
1998-03-28 00:50:41 +00:00
jtc 6351dbac24 Rename initialization and termination functions from __init() and
__fini() to _init() and _fini().  The linker sets the DT_INIT and
DT_FINI .dynamic section entries based on the latter names.
1998-03-27 09:11:33 +00:00
perry 43498a0a88 remove obsolete register declarations 1998-02-03 20:01:32 +00:00
thorpej 07de56201a Fix think'o in previous. 1997-10-24 21:18:25 +00:00
lukem 6bf85c9ba3 * use CPPFLAGS instead of CFLAGS for -D and -I options
* use COPTS instead of CFLAGS for -fPIC et al
* use ${COMPILE.c} instead of ${CC} ${CFLAGS} -c
* use FILES and FILESDIR to install pc532 objects (instead of install: rule) -
  this makes it consistent with the other a.out ports (arm32, i386, m68k, sparc)
1997-10-22 16:00:39 +00:00
thorpej 977b44de88 Ooops, typo in a comment. 1997-10-20 20:41:09 +00:00
thorpej 58ee7fe2a9 Add an __RCSID(). 1997-10-20 20:38:24 +00:00
mrg 395c20ea27 clean up WARNS on the alpha. 1997-10-10 08:45:29 +00:00
lukem 6fffd559bd WARNSify (not yet tested on all platforms yet) 1997-10-09 12:29:21 +00:00
cjs 7a66732d34 Back out BUILDDIR and NOINSTALL changes. 1997-05-31 21:21:13 +00:00
cjs 5fd7ce7066 These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.
1997-05-26 03:55:19 +00:00
mycroft eaaacab9dc __ps_strings is initialized to 0. 1997-05-17 16:19:49 +00:00
cgd 5e25db4c59 pull in the sysident.h from ld.so, for NetBSD PT_NOTE generation 1997-03-21 05:47:28 +00:00
cgd b3860e1660 fix _DYNAMIC definition bogon 1997-03-10 23:17:10 +00:00
cgd 78b14cccb3 s/mainprog_obj/__&/ 1997-03-10 23:13:31 +00:00
cgd 46db752aef fix include path bogosity pointed out by Greg Oster 1997-03-09 04:49:06 +00:00
cgd 3192bd314f turn Alpha's ELF_TOOLCHAIN checks to ECOFF_TOOLCHAIN checks 1997-02-23 20:42:24 +00:00
cgd bb52eeac41 build with -fPIC 1997-02-17 19:22:32 +00:00
cgd 4754bd637b make hard links from crt{begin,end}.o to crd{begin,end}S.o 1997-02-17 19:17:18 +00:00
cgd d71a874906 const-ify char *'s that need it 1997-01-03 18:23:41 +00:00
cgd 13d2436889 include dlfcn.h for exported dynamic loader function prototypes. 1996-12-18 22:25:09 +00:00
cgd 84e780e7f0 -I expected location of ELF shared loader 1996-12-14 06:03:14 +00:00
cgd 6da04f404e expect a 'struct ps_strings *' as the fourth argument to __start.
If it's there, i.e. doesn't have a value known to be emitted by kernels
which didn't include support for passing it (0 or 0xbabefacedeadbeef),
set __ps_strings to it.  Otherwise, use the old 'normal' PS_STRINGS value
for __ps_strings.
1996-12-07 20:04:38 +00:00
thorpej 25f2d6465d Use ${INSTALL}. 1996-10-18 05:27:38 +00:00
cgd c7a4944620 update so this compiles with the latest ELF ld.so. Include bsd.own.mk
at the top, for ELF_TOOLCHAIN definition, so this can be better
conditionalized for new/old toolchains.
1996-10-08 00:29:48 +00:00
cgd cccb7a88b4 Reimplement in C, adding ELF support. if compiled with -DECOFF_COMPAT
(currently the default), then it compiles on both an ECOFF toolchain
and on an ELF toolchain (but w/o support for dynamic linking or C++
constructors & destructors).  If compiled without -DECOFF_COMPAT, it
supports statically- or dynamically-linked ELF binaries (and shared
libraries).
1996-09-12 16:59:01 +00:00