Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu Try to also document the variant using common C code...
details: https://anonhg.NetBSD.org/src/rev/dffbb9b07617
branches: trunk
changeset: 787866:dffbb9b07617
user: martin <martin%NetBSD.org@localhost>
date: Wed Jul 10 09:41:16 2013 +0000
description:
Try to also document the variant using common C code - Matt, please review!
diffstat:
lib/csu/README | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r bac8b495ce96 -r dffbb9b07617 lib/csu/README
--- a/lib/csu/README Wed Jul 10 09:32:49 2013 +0000
+++ b/lib/csu/README Wed Jul 10 09:41:16 2013 +0000
@@ -11,9 +11,11 @@
A new platform should provide the following content in
arch/${MACHINE_ARCH} or arch/${MACHINE_CPU}:
-- Makefile.inc: provides ELFSIZE corresponding to 32/64bit file format
+- Makefile.inc: provides ELFSIZE corresponding to 32/64bit file format.
+ If using the common C code instead of crtbegin.S also provide a -I option
+ to find crtbegin.h in your arch subdir.
- crt0.S: provides setup code and the call to __start.
-- crtbegin.S: see below
+- crtbegin.S or crtbegin.h: see below
- crtend.S: see below, most likely just a copy of an existing architecture
- crti.S: prefix part of .init/.fini sections, i.e. to ensure stack alignment
- crtn.S: suffix part of the .init/.fini sections, i.e. return to caller.
@@ -82,3 +84,10 @@
Call the pointers as void (*)(void) functions.
5. If __deregister_frame_info is NULL, return.
6. Call __deregister_frame_info with the start of .eh_frame as the argument.
+
+
+Since most of this can easily be done in C code, instead of providing a
+crtbegin.S you can also chose to use the generic C implementation. Provide
+a crtbegin.h file instead of crtbegin.S. In there put inline assembler
+stubs (mostly copied from some other arch) and implement calls to the
+helper functions __do_global_ctors_aux/__do_global_dtors_aux.
Home |
Main Index |
Thread Index |
Old Index