This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SEGV eh throw in shared lib with ARM cross-GCC


Using G++ 2.95.3 cross compiler configured for a armv4l-hardhat-linux,
a throw in a shared library causes a SEGV.  A statically linked library
does not have the same problem.

Has anyone else seen this, or have any ideas on what might be happening?

===========
main.cpp:
extern void doit(void);
int main()
{
  doit();
}     
===========
libe.cpp:
#include <iostream>
 
void doit(void)
{
  try
  {
    throw 1;
  }
  catch (int a)
  {
    cout << "Caught int" << a << endl; 
  }
}
============
Makefile:
CC=armv4l-g++
 
main: main.cpp libe.so
        ${CC} -O0 -g $^ -L. -le -o $@
 
libe.so: libe.cpp
        ${CC} -fPIC -g -shared $^ -o $@                                       

--
Michael Eager     MontaVista Software, Inc.    	eager@mvista.com	
1237 E. Arques Ave.,   Sunnyvale, CA  94085	408-328-8426


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]