matt
01061e574e
Don't initialize %r2 for SDA2_BASE anymore. It's needed for TLS.
2011-03-12 07:56:36 +00:00
joerg
5c3ccd6eba
Pass down ELF Auxillary Vectors for static NetBSD binaries too.
...
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.
This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-07 05:09:09 +00:00
matt
2bf60042d7
When loading r13 and r2 with _SDA_BASE_ and _SDA2_BASE, do so in a PIC
...
manner. With this change, simple programs can now run with MKPIE=yes
2011-02-26 17:11:23 +00:00
skrll
1548def5e3
Remove old hack for broken binutils.
2011-02-23 10:26:09 +00:00
joerg
9674b81ed9
Introduce __weakref_visible to handle the different required visibility
...
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
2011-02-22 05:45:05 +00:00
joerg
86df96f692
Allow building with the changed weakref semantic in GCC 4.2 and clang.
2011-02-18 23:37:36 +00:00
matt
af25d173e6
Distinguish between a corrupt obj pointer and a null obj pointer.
2011-02-08 02:03:13 +00:00
matt
8f55cdd3bd
First pass at new crtstuff for powerpc. Doesn't quite work yet
...
(obj parameter to ___start seems to get corrupted sometimes)
2011-02-08 02:02:25 +00:00
drochner
953846fa39
use of .PARSEDIR just doesn't work with .OBJDIR, replace with .CURDIR
2011-01-31 17:54:20 +00:00
matt
b09982f7da
Use uintptr_t instead of u_long.
...
When fetching argc use off the stack, use *(long *) instead of *(int *)
because on mips64 BE system, that int deference will only fetch 0.
2011-01-23 06:25:57 +00:00
joerg
c37869d883
Build assembler sources with assembler compile rules.
2010-12-07 19:51:02 +00:00
joerg
cb0b8d7cc6
Fix stack alignment for non-constructor/destructor calls.
...
AMD64 stack is 16 Byte aligned at the start of the function,
so always push rbx.
2010-11-30 18:37:59 +00:00
skrll
15fa0783d7
Centralise USE_COMPILERCRTSTUFF.
...
PCC might need help.
2010-11-28 18:40:54 +00:00
joerg
fcd549e0e4
Retire old crtbegin/crtend implementation. It is not compatible with the
...
expectations of modern C++
2010-08-07 18:06:59 +00:00
joerg
01bc9d5012
Switch i386 and x86_64 to the new CRT layout. The crt0.c body is shared
...
between all platforms and a small assembler stub in crt0.S is used for
setting up the proper stack and whatever else MD needs.
Extract crti.S and crtn. from the old dot_init.h files. Prepare other
platforms that use the 6-argument form of __(_)start for this.
Rewrite the crtbegin and crtend modules in assembler to make them
compiler independent. Document the interface in README.
2010-08-07 18:01:32 +00:00
mrg
4f893703d8
delete all the a.out csu code.
2010-07-05 21:27:55 +00:00
matt
1e301281a1
Merge from matt-nb5-mips64
2009-12-14 01:00:46 +00:00
mrg
6b59d31236
move the include for <bsd.own.mk> down a little.
2009-12-13 08:52:38 +00:00
mrg
cba14cb13e
look for ${CSU_MACHINE_ARCH}_elf directory first.
2009-12-13 08:03:44 +00:00
skrll
7a915839ac
Make lib/csu compile. XXX somewhat bogus.
2009-11-09 14:34:42 +00:00
christos
ad57574aad
strip .ident, if MKSTRIPIDENT. From Adam Ciarci
2009-02-18 15:21:52 +00:00
gmcgarry
3c9a95916d
Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
2008-08-29 00:02:21 +00:00
lukem
ae07e87382
Enable MAKEVERBOSE support.
2008-07-21 15:34:58 +00:00
gmcgarry
38541e9dad
Remove old GCC bug work-around which relied on GCC extension.
2008-06-21 00:52:52 +00:00
mrg
c2b95373bf
remove clause #3 from my license where there are no other
...
copyright holders involved.
2008-05-29 14:51:25 +00:00
martin
5d1469bd77
Backout previous: the license sweep touched these files in error, so
...
restore the old license.
2008-05-10 15:31:03 +00:00
martin
3028e483e4
Convert to new 2 clause license
2008-04-29 06:53:00 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
rearnsha
00f0061ae9
ARM/Thumb interworking support
2008-03-15 10:46:24 +00:00
simonb
ccab3b34ce
Remove support for NetBSD/pc532.
2008-01-10 13:40:36 +00:00
skrll
587600728d
Fix things so that crti.o doesn't contain a completely bogus unwind entry
...
that covers far too much and confuses gdb.
While here remove useless dave/restore of r4.
2007-12-02 13:55:38 +00:00
yamt
c2ad33834a
CLEANFILES=${OBJS}
2007-12-01 11:06:36 +00:00
yamt
82f3754f04
___start: remove a stale comment.
2007-12-01 10:16:06 +00:00
skrll
6e57c35ead
Remove an include that's not required.
2007-11-13 08:41:50 +00:00
dogcow
b8d6c11ba4
<machine/profile.h> needs <sys/types.h>; why crt0.c needs <machine/profile.h>
...
(and only on amd64) is another question altogether.
2007-09-27 10:51:18 +00:00
skrll
795d937239
All platforms are MD_DO_NOT_NEED_FALLTHRU now so no need to keep it
...
conditional.
2007-05-15 16:51:37 +00:00
skrll
c97173f648
MD_DO_NOT_NEED_FALLTHRU for amd64.
...
Thanks to Juan Romero Pardines for testing.
2007-05-15 16:48:13 +00:00
scw
5764a76889
Remove support for NetBSD/{,evb}sh5.
2007-04-08 09:35:21 +00:00
skrll
bd529f8818
MD_DO_NOT_NEED_FALLTHRU for sh5. Compile tested only.
2007-03-31 21:12:37 +00:00
matt
bbd7ce97e9
Didn't fix it completely. Now fixed.
2007-03-16 22:50:22 +00:00
matt
0cc8f96491
Use MD_DO_NOT_NEED_FALLTHRU
2007-03-16 22:20:50 +00:00
martin
cc10b3e0c8
MD_DO_NOT_NEED_FALLTHRU - from Nick Hudson.
2007-01-02 14:32:34 +00:00
skrll
7e68cfaa21
powerpc MD_DO_NOT_NEED_FALLTHRU.
...
OK'ed by Matt Thomas.
2006-10-19 18:59:30 +00:00
skrll
e99b876999
Alpha MD_DO_NOT_NEED_FALLTHRU
...
Ok'd by Matt Thomas.
2006-10-19 16:47:38 +00:00
martin
799bddf8fa
MD_DO_NOT_NEED_FALLTHRU for sparc and sparc64, from Nick Hudson.
2006-10-19 08:37:46 +00:00
uwe
e7b566fa33
Switch to MD_DO_NOT_NEED_FALLTHRU.
...
While here: Factor out .section/.previous wrapper into a separate macro.
Provide frame pointer. Add the comment to MD_CALL_STATIC_FUNCTION to
explain why it needs semicolon and why we actually don't use that macro.
2006-10-17 01:10:26 +00:00
skrll
b0b0343b24
ANSIfy
2006-09-15 05:29:44 +00:00
cherry
51b652e0e3
-DELFSIZE=64 for csu build
2006-09-14 23:55:54 +00:00
skrll
296c01bb4f
MD_DO_NOT_NEED_FALLTHRU for hppa
2006-09-08 19:18:26 +00:00
skrll
61b77d1855
MD_DO_NOT_NEED_FALLTHRU for ARM.
2006-09-08 07:29:19 +00:00