SEGV eh throw in shared lib with ARM cross-GCC

Michael Eager eager@mvista.com
Tue Mar 27 16:07:00 GMT 2001


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



More information about the Gcc-bugs mailing list