This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
SEGV eh throw in shared lib with ARM cross-GCC
- To: GCC Bugs <gcc-bugs at gcc dot gnu dot org>
- Subject: SEGV eh throw in shared lib with ARM cross-GCC
- From: Michael Eager <eager at mvista dot com>
- Date: Tue, 27 Mar 2001 16:08:00 -0800
- Organization: MontaVista Software, Inc.
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