Commit Graph

281 Commits

Author SHA1 Message Date
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
jonathan
2ba4510cdc C versions of crt0 for mips. 1997-03-05 03:45:05 +00:00
explorer
6c8b64fd26 Someone forgot a line continuation character 1997-02-23 21:40:09 +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
scottr
372fe2ff92 Catch up with const changes to dlopen() and dlsym() prototypes in
<dlfcn.h>.  Tested on i386 and hp300 for crt0.o and ld.so, verified
other references by inspection.
1997-01-03 22:37:58 +00:00
cgd
d71a874906 const-ify char *'s that need it 1997-01-03 18:23:41 +00:00
pk
f2eb968909 asm => __asm__, and garbage collect a bit. 1996-12-27 21:44:59 +00:00
matthias
2793a4050c * Set __ps_strings + some code cleanup. 1996-12-27 08:30:13 +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
thorpej
f6a53d4680 Sync with the i386 crt0.c 1996-12-08 00:39:42 +00:00
pk
a7bb9f2ea8 Set __ps_strings which is passed in register %g1. 1996-12-07 23:47:40 +00:00
mycroft
f7bc1cda35 Tiny optimization in __syscall. 1996-12-07 23:31:07 +00:00
mycroft
e8770b9c15 Oops; don't need sys/syscall.h. 1996-12-07 23:00:20 +00:00
mycroft
a54c49b343 Set __ps_strings at startup. Move the argv/envp setup into a short assembler
prologue.  General cleanup.
1996-12-07 22:34:09 +00:00
mycroft
e1af33609a Add a __ps_strings variable here, initialized to 0. 1996-12-07 22:31:25 +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
ws
2aa55c5a2b NetBSD/powerpc doesn't support (yet?) -fpic 1996-11-03 18:12:00 +00:00
thorpej
5042faf816 RCS id police. 1996-10-18 05:36:42 +00:00
thorpej
25f2d6465d Use ${INSTALL}. 1996-10-18 05:27:38 +00:00
cgd
53ded8ebcb add a hack so that old- and new-toolchain alphas do the right thing:
include bsd.own.mk early on, and if !alpha or if !ELF_TOOLCHAIN,
build c++rt0.o.  ELF alphas don't use the 'normal' C++ runtime startup
routines.  Eventually, there should be better ways to distinguish what
toolchain and object format is in use, and the Alpha C++ startup code
changes should be merged with that used by the other ports.
1996-10-08 00:36:28 +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
cgd
44279d38cb user better local labels, be smarter with noat and use of the at register.
Suggested by Matt Thomas.
1996-09-09 01:03:38 +00:00
cgd
6f5a87ec6c remove a few macro definitions which duplicate (and in one instance,
conflict with) those in <machine/asm.h>.
1996-05-16 21:56:22 +00:00
mark
cd2d3b3a65 Initial commit of the crt0.o source for the arm32 port. 1996-02-02 16:23:16 +00:00
cgd
3601644b3c limit the flags that get passed to cpp 1995-12-20 12:36:56 +00:00
ragge
f1aad3abcc Really needed files, forgot them in -current after 1.1. 1995-12-12 08:04:47 +00:00
cgd
2a3b48cdaf CFLAGS+=, not CFLAGS= 1995-12-12 01:53:50 +00:00
cgd
c948e0646d profiling support 1995-11-04 00:30:50 +00:00
cgd
28426ef703 fix up a bit of profiling support 1995-10-29 19:54:15 +00:00
cgd
1162a1d4ff kill OSF/1 assembler support, and make gcrt0.o link (but not work). 1995-10-09 23:54:37 +00:00
pk
a9c6e6dfa1 Make `make depend' work. For this, it was necessary to remove ${.ALLSRC}
from the build rules; it has been replaced with `${.CURDIR}/${SRCS}'.
Also, avoid "a.out" like <mk/bsd.lib.mk>.
1995-09-29 11:23:15 +00:00
pk
dae6393cae atexit() cannot reliably be used in this context. Introduce `.fini' which
is called from rtld through _dlexit() or when this object is unloaded
(from Doug Rabson).
1995-09-23 22:38:22 +00:00
pk
3994f31209 Activate interface version 4: call dlexit() at exit. 1995-09-23 22:34:20 +00:00
mellon
af776e8143 Correctly build gcrt0.o 1995-06-15 21:59:25 +00:00
mellon
0cfebbe02b start -> __start in END macro as well 1995-06-15 21:58:44 +00:00
mellon
96ba717024 start -> __start to avoid namespace bugs 1995-06-15 21:56:58 +00:00
pk
ef3ad469b6 Private strrchr() not needed for scrt0.o 1995-06-15 21:41:41 +00:00
pk
f087571372 First arg. of syscall2() is a quad_t. 1995-06-06 09:04:51 +00:00
pk
69ae425298 Build run-time code for use in static executables, called `scrt0.o'. 1995-06-05 01:57:04 +00:00
pk
275fc2ee0d #include <dlfcn.h>, and <string.h> too. 1995-06-05 00:13:05 +00:00
pk
25b9fa86e4 one more prototype 1995-06-05 00:10:44 +00:00
pk
6226310a31 add dlerror() stub 1995-06-04 23:29:14 +00:00
pk
846beea318 Factor out common code. 1995-06-03 13:16:03 +00:00
pk
c64cecc457 Protoize (from Thorsten Lockert, PR #1070).
Some other cleanup.
1995-06-02 21:30:47 +00:00
pk
fd77fcfc4c Make this compile warning-free (from Thorsten Lockert, PR 1071). 1995-06-02 15:55:27 +00:00
phil
f722fd7346 Update to -DDYNAMIC as I thought I had a long time ago. 1995-05-29 06:18:12 +00:00
mycroft
6ee8835631 Keep argv[0] in a register. 1995-05-17 15:55:26 +00:00
mycroft
3ad209c804 Calculate environ directly from argc and argv, rather than searcing down
the argument list.
1995-05-16 16:25:04 +00:00
mellon
139d140728 Ensure that __progname is in .data, not in .sdata 1995-05-03 22:13:15 +00:00
mycroft
4c34be6b52 Clean up deleted files. 1995-03-01 00:00:00 +00:00
cgd
9fac9bc0af initial alpha support. no profiling support. 1995-02-10 17:53:00 +00:00
mycroft
d11034718e Don't map the data segment with PROT_EXEC. 1995-01-17 06:10:31 +00:00
mycroft
6d9a99f698 Use the new syscall method. 1995-01-17 06:09:43 +00:00
mycroft
fb7161aa7e Use ${COMPILE.S}, not ${CPP} directly. 1995-01-07 23:21:41 +00:00
mycroft
3dbc1e9443 Patch from Giles Lean to make compilation flags more consistent. 1995-01-07 23:07:03 +00:00
mycroft
d8f841190c .s -> .S 1994-12-16 10:01:23 +00:00
mycroft
c32023e792 More underscores... 1994-12-15 17:02:08 +00:00
dean
add2031dcf Prepended underscores 1994-11-14 23:33:46 +00:00
mycroft
f3a089395b Kill historical cruft. 1994-07-31 19:57:46 +00:00
pk
63027d510b `LDSO' is for debugging only. 1994-07-26 19:53:46 +00:00
phil
f4bddced4a update mmap call. 1994-06-09 05:50:34 +00:00
glass
f518ec51c9 crt0 support for mips..no shared library support 1994-05-24 07:33:47 +00:00
mycroft
93ac2f912e Clean up deleted files. 1994-05-14 06:33:26 +00:00
cgd
0c3c9c68ab kill all gprof-related stuff; it's now in libc, and the header is elsewhere 1994-05-14 06:33:22 +00:00
mycroft
91cd8bafa5 Clean up deleted files. 1994-05-14 06:33:20 +00:00
cgd
8cb13545d3 kill all gprof-related stuff; it's now in libc, and the header is elsewhere 1994-05-14 06:33:17 +00:00
mycroft
9177dd175a Clean up deleted files. 1994-05-14 06:33:16 +00:00
cgd
bc03451854 kill all gprof-related stuff; it's now in libc, and the header is elsewhere 1994-05-14 06:33:14 +00:00
mycroft
49f9da4a97 Clean up deleted files. 1994-05-14 06:33:11 +00:00
cgd
b22a4fbae6 kill all gprof-related stuff; it's now in libc, and the header is elsewhere 1994-05-14 06:33:05 +00:00
phil
9d4fe61ad7 changes to support shared libs. 1994-05-03 07:35:28 +00:00
pk
ae9be14d68 Fix that SYS___syscall business. 1994-04-18 20:02:58 +00:00
cgd
79b8b4562d new way of invoking mmap. 1994-04-05 02:26:13 +00:00
cgd
00ae28f054 explicit cast off mmap offset to off_t 1994-03-28 05:26:00 +00:00
cgd
95d6a185be no more MAP_FILE 1994-03-28 02:07:04 +00:00
pk
fa491c1bc9 Remove some leftover SunOS dialect. 1994-03-10 21:09:49 +00:00
pk
140eeb543a Use atexit(), not on_exit(). 1994-03-10 21:02:01 +00:00
pk
8aee50b714 add -DDYNAMIC 1994-03-03 14:27:34 +00:00
pk
938f8ffda8 Set __progname; update to current <link.h> 1994-02-25 15:02:58 +00:00
mycroft
11f187b6a3 Clean up deleted files. 1994-02-25 03:40:12 +00:00
cgd
c882b54db3 kill bogus install -d's. the one for /usr/include/rpcsvc is still here. 1994-02-10 01:10:01 +00:00
mycroft
baa1c94cb8 Change silly cast to avoid a compiler warning. 1994-01-29 02:34:21 +00:00
mycroft
868e255f15 Sync with i386 code. 1994-01-29 02:20:16 +00:00
jtc
fc1d8f3bac Fix spelling error in Copyright notice 1994-01-29 01:54:01 +00:00
pk
db1f5577e7 dl*() stubs 1994-01-28 21:51:52 +00:00
deraadt
fefdca9988 c++ not g++ 1994-01-10 14:09:16 +00:00
mycroft
6d4a19bff5 Clean up deleted files. 1994-01-07 19:15:52 +00:00
pk
36328be690 Rename lib/csu/g++ to lib/csu/c++ 1994-01-07 19:15:31 +00:00
pk
e2c9704c72 Simplify code and add copyright. 1994-01-06 23:39:25 +00:00
mycroft
d6718d4665 Put back ld -x -r. 1994-01-06 04:35:39 +00:00
mycroft
22f50fc547 Remove ld -x -r until it actually works. 1994-01-05 23:47:35 +00:00
mycroft
8381eeac4d Use -fpic. 1994-01-05 23:32:09 +00:00
pk
e5ea148320 Subdirectory g++ contains C++ shared library helper routines. 1994-01-05 21:05:11 +00:00
mycroft
2ac9b46bdd Allow ld.so to be QMAGIC. 1994-01-04 23:40:31 +00:00
pk
ada9ac5f49 Cleanup 1993-12-15 09:46:28 +00:00
mycroft
e5941784b3 Clean up deleted files. 1993-12-04 22:40:26 +00:00
cgd
318d90d37f use MACHINE_ARCH to pick which crt0 to use. 1993-12-04 22:39:21 +00:00
paulus
156ee99921 C-startup routines for generic m68k machines, with shared library support. 1993-11-25 23:22:41 +00:00
pk
31ca12249f Clean out Sparc code. 1993-11-21 13:35:42 +00:00
pk
12094d064d Can get rid of local symbols with "ld -x -r" again.
Made LDSO #ifdef DEBUG.
1993-11-04 10:51:39 +00:00
pk
65fc5961b5 `ld -x -r crt0.o' defines __DYNAMIC as data. This we cannot use.
Disabled until I sort it out.
1993-10-24 01:34:24 +00:00
pk
bd67a6f934 Enabled __DYNAMIC. 1993-10-23 00:47:15 +00:00
pk
c677f4482a Haven't tested these for NetBSD, but they work in SunOS. 1993-10-16 22:02:58 +00:00
pk
4406f07dc2 Startup code supporting shared libraries.
NOTE: #ifdefs sparcs should be removed
1993-10-16 21:58:39 +00:00
jtc
4048c19048 Define errno. 1993-10-13 23:45:22 +00:00
phil
8c563dc201 Initial pc532 tree. 1993-09-17 18:42:11 +00:00
mycroft
293c6d88e3 8 spaces -> a tab 1993-08-10 14:48:03 +00:00
deraadt
8cb4a5221c 8 spaces -> a tab 1993-08-10 08:35:59 +00:00
mycroft
47799e1141 Add __progname, and clean up a couple of things. 1993-08-09 05:47:02 +00:00
mycroft
9df69621f3 Reclone from i386 version; has important changes for cross-compilation. 1993-08-09 04:50:21 +00:00
mycroft
7ea474ac33 Clean up automatic creation of /usr/lib. 1993-08-09 04:49:39 +00:00
mycroft
e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft
cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
mycroft
f6e43c3958 Use ${COPY}, not -c for install. 1993-07-18 19:17:22 +00:00
deraadt
ac1c140b61 ok, all executables just got 16 bytes shorter. removed a bunch
of "nops" from the start of the crt.
1993-07-07 01:33:52 +00:00
cgd
b1793f25e7 oops; last time i moved stuff, was to the wrong place...
don't use csu.* any more, just use *...
1993-05-18 10:08:43 +00:00
cgd
574bfabf9b move csu.${MACHINE} into a "csu" subdirectory. 1993-05-18 07:48:34 +00:00
cgd
95661f18d9 add hp300 crt0 files 1993-05-13 13:50:54 +00:00
glass
b64b1fd758 added some support new err(3) shit needs 1993-04-30 23:09:06 +00:00
mycroft
f909f1bb33 Use global value of CFLAGS. 1993-04-24 22:48:30 +00:00
cgd
630d08dbe3 make sure directory to install stuff exists before installing,
and copy libs rather than mv'ing them, on install
1993-04-09 09:39:34 +00:00
cgd
5d07e08579 added changes from Steven Reiz <sreiz@aie.nl> (based on
those by Poul-Henning Kamp <phk@data.fls.dk>) to get the kernel
to compile properly when gcc2.* is cc.  (should still work
when gcc1.39 is in use.)
1993-04-03 02:15:18 +00:00
cgd
e541169ce2 after 0.2.2 "stable" patches applied 1993-03-21 18:04:42 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00