Conform to new world order where .init/.fini fallthru code
assembly appears directly inside _init().
This commit is contained in:
parent
de888ac7f5
commit
d0531274ae
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dot_init.h,v 1.1 2006/06/30 22:49:50 ross Exp $ */
|
||||
/* $NetBSD: dot_init.h,v 1.2 2006/07/05 18:03:00 ross Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2006 Ross Harvey
|
||||
|
@ -36,17 +36,6 @@
|
|||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
#include <machine/asm.h>
|
||||
|
||||
/*
|
||||
* These must be extern to avoid warnings ("declared static but never defined")
|
||||
* However, only the declaration is extern, the actually __asm() defines them
|
||||
* as static.
|
||||
*/
|
||||
#define INIT_FALLTHRU_DECL void init_fallthru(void)
|
||||
#define FINI_FALLTHRU_DECL void fini_fallthru(void)
|
||||
|
||||
#define INIT_FALLTHRU() init_fallthru()
|
||||
#define FINI_FALLTHRU() fini_fallthru()
|
||||
|
||||
#define MD_SECTION_PROLOGUE(sect, entry_pt) \
|
||||
__asm ( \
|
||||
".pushsection \".opd\",\"aw\" \n" \
|
||||
|
@ -72,8 +61,10 @@
|
|||
" blr \n" \
|
||||
".popsection")
|
||||
|
||||
#define MD_INIT_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.init, init_fallthru)
|
||||
#define MD_FINI_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.fini, fini_fallthru)
|
||||
#define MD_INIT_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.init, _init)
|
||||
#define MD_FINI_SECTION_PROLOGUE MD_SECTION_PROLOGUE(.fini, _fini)
|
||||
|
||||
#define MD_INIT_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.init)
|
||||
#define MD_FINI_SECTION_EPILOGUE MD_SECTION_EPILOGUE(.fini)
|
||||
|
||||
#define MD_DO_NOT_NEED_FALLTHRU
|
||||
|
|
Loading…
Reference in New Issue