matt
e18dedbd2f
switch from addis R,0,... to the simplified mnemonic of lis which is
...
typically used for this.
2002-04-26 23:28:53 +00:00
kleink
3f1a2352b7
Use __weak_extern() for _SDA_BASE_ and _SDA2_BASE_ declarations.
2002-04-17 17:36:13 +00:00
matt
036d79bb12
Make sure to initialize GPR13/GPR2 appropriately for the Small Data Area
...
pointer as described in the SVR4 PPC ABI. Though GPR2 is defined by the
SVR4 PPC ABI as system-reserved, the EABI (Embedded API) changes its use
to be the Small Data Area 2 register (const small data). Since powerpc
under NetBSD doesn't use R2 in the kernel (yet), support it as well.
2002-04-17 13:32:42 +00:00
skrll
2d0a923dcd
Correct some comments.
2002-04-08 22:17:37 +00:00
jmc
c03ef26393
Don't make ___start static as gcc can't tell it's referenced and complains.
2002-04-04 08:22:11 +00:00
eeh
41065b740e
Don't need `start' in crt0.o any more. ld expects `_start' as the entry
...
symbol, while gcc likes `__start'.
2002-03-29 18:11:55 +00:00
matt
0ce5ca145f
Change to use a register prefix.
2002-02-24 01:06:18 +00:00
matthias
21fb786623
Declare the global register variable kps_strings before including anything
...
as this needs to be done before any function is defined (and there seems
to be a function definition in one of the include files).
2002-02-22 13:46:30 +00:00
mrg
829b76292e
fix multiline string literal. from gcc3
2002-02-11 06:08:23 +00:00
thorpej
e4217fbfe4
Pass the rtld object and ps_strings to _start() properly. From Marcus.
2002-02-03 23:57:19 +00:00
thorpej
ec206ac99b
Multi-line string literals are not in ISO-C.
2002-01-23 03:55:33 +00:00
drochner
e757f639d2
don't include <machine/asm.h> to avoid conflicts with definitions
...
in <sys/cdefs.h>
2002-01-14 12:06:49 +00:00
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
caaec27cfe
* Use += to assign OBJS so that machine-dependent Makefiles can
...
add their own objects to the list.
* Garbage-collect an unneeded CLEANFILES assignment.
2002-01-13 19:59:26 +00:00
thorpej
d605da06f0
%progbits, not @progbits (@ is a comment character in ARM assembly).
2002-01-01 01:36:21 +00:00
thorpej
7050ac9aa9
Multi-line string literals are not supported by ANSI C.
2002-01-01 01:31:06 +00:00
thorpej
5ced70565e
Set ELFSIZE=64.
2002-01-01 01:14:22 +00:00
thorpej
d8abc59932
Add support for invoking GNU C++ local destructors in shared objects
...
via the __cxa_finalize() mechanism.
XXX Only enabled for new-toolchain platforms, as it requires the assembler
to support the .hidden pseudo-op.
2001-12-31 00:40:11 +00:00
thorpej
a50163af65
Build separate crt{begin,end}.o and crt{begin,end}S.o files, rather
...
than linking them at install time. Forthcoming changes require different
behavior for static vs. shared object versions of these files.
2001-12-31 00:11:13 +00:00
thorpej
c41160abff
Add support for registering Java classes emitted by the Java compiler
...
(e.g. the Java compiler in GCC 3.x) into the ".jcr" section.
2001-12-30 23:45:00 +00:00
thorpej
6027dc5536
Make sure the Dwarf2 EH frame info is 4-byte aligned.
2001-12-30 23:26:20 +00:00
thorpej
5b81869561
Don't use multi-line string literals; they're not supported by ANSI C.
2001-12-30 23:23:38 +00:00
bjh21
7723559395
Quiet GCC warnings.
2001-11-08 22:23:59 +00:00
lukem
65469e54b3
pull in ../../Makefile.inc
2001-11-05 15:11:40 +00:00
skrll
6d6c931c5a
This is an a.out thing and doesn't belong here.
2001-10-26 16:05:25 +00:00
scw
f768a5c42b
Reduce the alignment constraint from 4 to 2. This fixes the problem where
...
gas(2) pads the text segment with 0x0 instead of NOP. Since m68k instructions
only need 16-bit alignment, .align 2 works just fine.
2001-10-13 09:21:50 +00:00
kristerw
031a62292d
Run the entries in __CTOR_LIST__ and __DTOR_LIST__ in the order gcc expect.
2001-10-11 18:02:28 +00:00
matt
eef4b63246
Make __start global.
2001-09-08 18:59:20 +00:00
bjh21
751e6fa590
Ensure that the stack is aligned to an 8-byte boundary before calling C code.
...
(ATPCS B-01)
2001-08-17 00:14:38 +00:00
simonb
9a68629ca6
Enlarge the stack frame to 16 bytes, and store the return address 8
...
bytes in instead of at the start, to leave room for a .cpload to store
the gp at offset 0 in the frame. Allow 8 bytes for each (for mips64
one day...).
.cpload overwrite problems noted by Michael Hitch.
2001-08-16 03:44:46 +00:00
matt
ee6a16ad18
Add a secondary label called __start (makes gcc 2.95.3 happier) and rename
...
the internal __start to ___start. (Since -e is not supplied by default,
this has no effect on a native build.)
2001-08-05 00:01:27 +00:00
thorpej
102df4197d
Enable DWARF2 EH support. Confirmed working w/ GCC 2.95.3 on sparc
...
and i386.
2001-08-03 14:26:13 +00:00
thorpej
a6855eea24
Add support for DWARF2 frame unwinding/exception handling. This
...
should be sufficient for GCC 2.95.3, and probably GCC 3.0 as well.
Not yet enabled by default; further testing required.
2001-08-03 05:54:43 +00:00
wiz
e11d04474c
issueing -> issuing
2001-07-26 22:55:12 +00:00
tsubai
1278735b51
.init/.fini support.
2001-07-23 20:43:31 +00:00
bjh21
71d647ec7a
The common arm_elf code seems to work on arm26, so use that.
2001-07-20 13:01:13 +00:00
simonb
19211890ff
Enable dot_init.h on mips, fixing .init & .fini processing.
2001-07-18 04:43:48 +00:00
mrg
6bea810c23
enable dot_init.h on both sparc & sparc64, fixing .init & .fini processing
...
for both platforms. they share dot_init.h with a single #ifdef #define
difference...
2001-07-17 18:25:11 +00:00
simonb
1bc139fd41
Add but not enable correct .init/.fini handling.
2001-07-17 15:20:23 +00:00
mrg
f4bd34ec5f
add but not enable correct .init/.fini handling.
2001-07-17 13:32:35 +00:00
mrg
ff68bb147c
minor KNF
2001-07-17 13:28:05 +00:00
tsubai
4a0b75d5d2
Add the new .init/.fini support.
2001-07-17 12:16:43 +00:00
matt
119c72fb96
Add new init/fini to VAX ELF.
2001-07-17 06:45:46 +00:00
matt
ae9f64ff3b
Turn-on new init/fini processing.
2001-07-17 06:39:14 +00:00
thorpej
4abcdae85e
Enable the new (working) .init/.fini magic.
2001-07-17 03:56:48 +00:00
matt
126898a2cd
Initial CSU for ARM with shared ELF.
2001-07-15 17:29:00 +00:00
fvdl
a84b13f43f
CSU for x86-64 port.
2001-06-19 00:49:06 +00:00
mrg
f59b9e737f
set FILESDIR to "${LIBDIR}", not hard coded /usr/lib.
2001-06-07 15:22:49 +00:00
fredette
e80c95ddb2
Don't use an EA with a scaled index, it isn't supported on the 68000.
2001-05-17 21:21:07 +00:00
fredette
872a39428c
Don't compile with -fPIC when MACHINE_ARCH is m68000.
2001-05-17 21:17:02 +00:00
kleink
7bd28edec7
Add, but do not yet enable, m68k code for .init and .fini section fallthroughs.
2001-05-12 00:17:55 +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
bjh21
0113cca535
Our ARM ELF ld(1) currently has problems with PIC relocations, so don't
...
generate them. I suspect this is safe until we get PIC in general working.
2001-04-28 17:32:33 +00:00
msaitoh
581638d47c
check __LEADING_UNDERSCORE
2001-02-25 15:51:24 +00:00
eeh
6a9224a06d
Remove old compatibility hack. Should no longer be needed.
2001-02-21 00:47:21 +00:00
simonb
71c90eeec6
ANSIfy and merge some stylistic changes from arm26/crt0.c.
...
No functional changes.
2001-02-18 23:03:34 +00:00
simonb
5df49e36f3
Fix typo.
2001-02-18 23:01:39 +00:00
bjh21
015575c577
Use _C_LABEL rather than _C_FUNC.
2001-02-03 16:25:26 +00:00
enami
0ebf8f7f72
- Fix typo
...
- Wrap long line
2001-01-10 13:20:17 +00:00
itojun
99b0df5333
use MACIHNE_CPU to determine architecture-dependent source code directory.
...
is use of exists(foo) safe enough?
TODO: many other places to fix
2001-01-08 08:29:59 +00:00
itojun
264cf8dcf3
sh3 split
2001-01-04 08:01:49 +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
mycroft
0ef3f52396
Make this work before and after the kernel is switched to DTRT with argc.
...
This is temporary, only to make the flag day less painful.
2000-07-25 21:42:55 +00:00
eeh
f310f1fd32
Handle dynamic binaries too.
2000-07-18 22:35:45 +00:00
matt
d71ca2d66e
__syscall takes a quad_t as its first argument, not an int.
...
_strrchr takes an int (due to promotion) as its third arg.
don't print the null byte at the end of string.
error messages should end with a linefeed.
2000-07-03 23:01:01 +00:00
matt
06f872af34
Use the ___start etc.
2000-07-03 03:56:56 +00:00
christos
3d65200a80
remove initialization of mainprog_obj from here; it is too late for .ini
...
sections that want to use dlopen(3).
2000-06-16 20:52:49 +00:00
cgd
c39575e265
sweep of my licenses for consistency. (no functional changes) These
...
files have copyright held by people in addition to myself. (I did the
original work, they copied it, enhanced it, and added their copyright
to the derivative work.) Their approval has been given re: the license
change.
2000-06-15 16:48:28 +00:00
cgd
c85d2eb42b
sweep of my licenses for consistency. (no functional changes) These
...
files have copyright held by people in addition to myself. (I did the
original work, they copied it, enhanced it, and added their copyright
to the derivative work.) Their approval has been given re: the license
change.
2000-06-14 22:52:37 +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
thorpej
193ccba813
Normalize copyright notice.
2000-06-14 16:09:54 +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
bjh21
6c97e2bd78
Initial commit of arm26 port
2000-05-09 21:55:44 +00:00
dmcmahill
7348e432f3
change -fpic to -fPIC. Among other things this will let sparc shared
...
c++ libraries built with pkglibtool (which uses -fPIC) work.
change approved by mycroft.
2000-04-29 17:42:46 +00:00
minoura
78b105698a
Move dl* function definitions to libc on ELF.
...
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html .
2000-04-02 15:35:47 +00:00
kristerw
33c172d1c1
Const poisoning of dladdr (so that things build after the dlfcn.h change)
2000-02-09 22:41:53 +00:00
scottb
076e309d3e
change first argument of dladdr to const.
2000-02-08 16:22:59 +00:00
scottb
c0cf420b69
add hooks to support the dladdr function.
2000-02-07 21:40:40 +00:00
mycroft
c29a577031
Adjust for .mk file changes.
2000-01-22 19:37:57 +00:00
eeh
818cfe2268
Workaround for gcc 2.96 bugs.
1999-12-30 15:34:47 +00:00
lukem
fe5a2bf74b
remove the ``static'' from `static void __start()' and `static void ___start()'
...
because an overly aggressive gcc -O3 "cleverly" optimizes the functions out.
noted in [port-i386/8493], but seen in other ports as well.
1999-11-02 10:07:12 +00:00
lukem
fe0968e395
wrap line
1999-11-02 10:03:44 +00:00
msaitoh
2cf9cd31f6
add csu for sh3
1999-10-07 11:56:28 +00:00
mrg
6f967b5c4a
add a _start symbol ld(1) can find.
1999-08-24 08:55:27 +00:00
kleink
a363a1a034
* __start -> _start, ___start -> __start
...
* Bump _start() alignment to 4 bytes.
1999-08-23 09:23:06 +00:00
kleink
fc5695807b
Bump _start() alignment to 4 bytes.
1999-08-23 09:10:23 +00:00
matt
741f18b695
Initial VAX ELF32 support (mostly untested). It's checked primarily for
...
testing and archival for now. I don't expect anyone to work with it
since the binutils and gas changes are still pending. But you got to
crawl before you walk.
1999-08-21 19:26:18 +00:00
kleink
b9f86eb3a1
Namespace cleanup: move runtime linker interface into implementation namespace
...
and provide weak aliases.
1999-08-19 20:52:36 +00:00
fvdl
3cf76a4d16
Add _start (as well as __start). It's the default start symbol expected
...
by ld for the i386 ELF case.
1999-07-07 22:59:47 +00:00
simonb
6bf3aa19f9
More trailing white space.
1999-07-02 15:46:05 +00:00
thorpej
3787c5c3d8
MAP_COPY -> MAP_PRIVATE
1999-06-17 21:09:47 +00:00
kleink
196becef81
Declare dlerror()'s return value __aconst.
1999-05-19 14:50:49 +00:00
kleink
28d76befd4
When calling dlerror() in a non-dynamically linked executable, return a pointer
...
to an error string rather than NULL (`no errors occured) to indicate the cause
of failure return values of other dl*() interfaces.
1999-05-19 14:47:12 +00:00
kleink
faa2202a49
Use __weak_extern() instead of an asm statement.
1999-05-02 18:26:43 +00:00
simonb
45c86b888b
Instead of rolling our own "install" target, use FILES/FILESDIR and
...
LINKS to that things like "make install UPDATE=" work properly.
1999-04-03 16:39:31 +00:00
simonb
38ca0e64c8
s;/usr/lib;${LIBDIR};
1999-04-03 16:28:49 +00:00
tsubai
5f1a262044
Fix typo. (COPT --> COPTS)
1999-04-02 12:09:44 +00:00