diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1999-02-01 17:02:48 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1999-02-01 17:02:48 +0000 |
commit | ff65b5e4757edc5aa47aef0a06d2f910d17b894d (patch) | |
tree | 447894af33c5d191e7177d26452d3809994d35f5 /lib/csu | |
parent | bec0fd2d874580bd6461552dfda8b1fe71985603 (diff) |
When compiling for ELF use .init and .fini sections instead of special syms.
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/c++/c++rt0.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/csu/c++/c++rt0.c b/lib/csu/c++/c++rt0.c index 7c407785146..4e22ced6537 100644 --- a/lib/csu/c++/c++rt0.c +++ b/lib/csu/c++/c++rt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c++rt0.c,v 1.5 1998/09/15 11:01:51 pefo Exp $ */ +/* $OpenBSD: c++rt0.c,v 1.6 1999/02/01 17:02:47 pefo Exp $ */ /* $NetBSD: c++rt0.c,v 1.6 1997/12/29 15:36:50 pk Exp $ */ /* @@ -80,8 +80,13 @@ __ctors() (**p++)(); } +#if !defined(NATIVE_EXEC_ELF) extern void __init __P((void)) asm(".init"); extern void __fini __P((void)) asm(".fini"); +#else +extern void __init __P((void)) __attribute__ ((section (".init"))); +extern void __fini __P((void)) __attribute__ ((section (".fini"))); +#endif void __init() |