diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-02 22:50:23 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-02 22:50:23 +0000 |
commit | 72ac783d4c47aaab0180133789f93d813e5f7bac (patch) | |
tree | c8fcdad3d35757efe740dbeac92c62d651f26871 /gcc/crtstuff.c | |
parent | 2287acd49e977e5391b002004d74f3f947423481 (diff) | |
download | gcc-72ac783d4c47aaab0180133789f93d813e5f7bac.tar.gz |
* crtstuff.c (__frame_dummy): New function for irix6.
(__do_global_ctors): Call __frame_dummy for irix6.
* iris6.h (LINK_SPEC): Hide __frame_dummy too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17281 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/crtstuff.c')
-rw-r--r-- | gcc/crtstuff.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index 3f3643f6b8d..d296ea9084b 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -1,6 +1,6 @@ /* Specialized bits of code needed to support construction and destruction of file-scope objects in C++ code. - Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 94-97, 1998 Free Software Foundation, Inc. Contributed by Ron Guilmette (rfg@monkeys.com). This file is part of GNU CC. @@ -257,6 +257,18 @@ __do_global_dtors () __deregister_frame_info (__EH_FRAME_BEGIN__); #endif } + +#ifdef EH_FRAME_SECTION_ASM_OP +/* Define a function here to call __register_frame. crtend.o is linked in + after libgcc.a, and hence can't call libgcc.a functions directly. That + can lead to unresolved function references. */ +void +__frame_dummy () +{ + static struct object object; + __register_frame_info (__EH_FRAME_BEGIN__, &object); +} +#endif #endif #endif /* defined(INIT_SECTION_ASM_OP) */ @@ -387,15 +399,13 @@ __do_global_ctors_aux () /* prologue goes in .text section */ /* This case is used by the Irix 6 port, which supports named sections but not an SVR4-style .init section. __do_global_ctors can be non-static in this case because we protect it with -hidden_symbol. */ -extern char __EH_FRAME_BEGIN__[]; static func_ptr __CTOR_END__[]; void __do_global_ctors () { func_ptr *p; #ifdef EH_FRAME_SECTION_ASM_OP - static struct object object; - __register_frame_info (__EH_FRAME_BEGIN__, &object); + __frame_dummy (); #endif for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--) (*p) (); |