Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/vax_elf Add MD_CALL_STATIC_FUNCTION. This allows cr...



details:   https://anonhg.NetBSD.org/src/rev/0aef869fd203
branches:  trunk
changeset: 556641:0aef869fd203
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Dec 22 21:05:01 2003 +0000

description:
Add MD_CALL_STATIC_FUNCTION.  This allows crt* to compiled with -g.

diffstat:

 lib/csu/vax_elf/dot_init.h |  34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diffs (49 lines):

diff -r 77f8ca75b7a3 -r 0aef869fd203 lib/csu/vax_elf/dot_init.h
--- a/lib/csu/vax_elf/dot_init.h        Mon Dec 22 16:20:46 2003 +0000
+++ b/lib/csu/vax_elf/dot_init.h        Mon Dec 22 21:05:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.1 2001/07/17 06:45:46 matt Exp $ */
+/* $NetBSD: dot_init.h,v 1.2 2003/12/22 21:05:01 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -47,20 +47,26 @@
 #define        INIT_FALLTHRU() init_fallthru()
 #define        FINI_FALLTHRU() fini_fallthru()
 
-#define        MD_SECTION_PROLOGUE(sect, entry_pt)             \
-               __asm (                                 \
-               ".section "#sect",\"ax\",@progbits      \n"\
-               "       .align  1                       \n"\
-               #entry_pt":                             \n"\
-               "       .word 0                         \n"\
-               "       /* fall thru */                 \n"\
-               ".previous")
+#define        MD_SECTION_PROLOGUE(sect, entry_pt)                     \
+               __asm (                                         \
+               "       .section "#sect",\"ax\",@progbits\n"    \
+               "       .align  1\n"                            \
+               #entry_pt":\n"                                  \
+               "       .word 0\n"                              \
+                       /* fall thru */                         \
+               "       .previous")
 
-#define        MD_SECTION_EPILOGUE(sect)                       \
-               __asm (                                 \
-               ".section "#sect",\"ax\",@progbits      \n"\
-               "ret                                    \n"\
-               ".previous")
+#define        MD_SECTION_EPILOGUE(sect)                               \
+               __asm (                                         \
+               "       .section "#sect",\"ax\",@progbits\n"    \
+               "       ret\n"                                  \
+               "       .previous")
+
+#define        MD_CALL_STATIC_FUNCTION(sect, func)                     \
+               __asm (                                         \
+               "       .section "#sect",\"ax\",@progbits\n"    \
+               "       calls   $0,"#func"\n"                   \
+               "       .previous");
 
 #define        MD_INIT_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.init, init_fallthru)
 #define        MD_FINI_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.fini, fini_fallthru)



Home | Main Index | Thread Index | Old Index