This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[pch issue] Error: symbol `.LEHB0' is already defined
- From: Karel Gardas <kgardas at objectsecurity dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Fri, 6 Jun 2003 15:05:56 +0200 (CEST)
- Subject: [pch issue] Error: symbol `.LEHB0' is already defined
Hello,
>From time to time I'm experimenting with gcc3.4 on MICO
(http://www.mico.org) sources. Mainly I'm interested in gcc pch
implementation. Unfortunately I'm still not able to get PCH working
with MICO sources because of:
/tmp/ccCAx9DP.s:3038: Error: symbol `.LEHB0' is already defined
like errors.
I have already post the problem
http://gcc.gnu.org/ml/gcc/2003-01/msg00070.html, but I'm still not
able to find right as simple as possible source code for this issue
duplication to post it to the bugzilla.
So I would like to describe my analysis of this problem till this
moment and maybe somebody here will have some ideas/hints what to do
more.
So I have hacked MICO 2.3.10 and compilation fails with:
thinkpad:~/arch/devel/gcc-pch/orb$ make
c++ -I../include -DFAST_PCH -Wall -fpermissive -DPIC -fPIC -c orb_pch.h
../include/mico/code_set_registry.h:5: warning: `CORBA::Codeset::Info
_osf_cs_reg[193]' defined but not used
c++ -I../include -DFAST_PCH -Wall -fpermissive -DPIC -fPIC -c os-unix.cc -o os-unix.pic.o
../include/mico/code_set_registry.h:5: warning: `CORBA::Codeset::Info
_osf_cs_reg[193]' defined but not used
/tmp/ccCAx9DP.s: Assembler messages:
/tmp/ccCAx9DP.s:3038: Error: symbol `.LEHB0' is already defined
/tmp/ccCAx9DP.s:3044: Error: symbol `.LEHE0' is already defined
/tmp/ccCAx9DP.s:3047: Error: symbol `.LEHB1' is already defined
/tmp/ccCAx9DP.s:3100: Error: symbol `.LEHE1' is already defined
make: *** [os-unix.pic.o] Error 1
os-unix.cc compilation should use orb_pch.h.gch file, since the beginning
of this file looks:
#ifdef FAST_PCH
#include "orb_pch.h"
#endif // FAST_PCH
#ifdef __COMO__
#pragma hdrstop
#endif // __COMO__
#ifndef FAST_PCH
....
I also identified the source of problems. It's header file
include/mico/throw.h where problematic piece of code looks:
static void
mico_sii_throw (CORBA::StaticRequest *r, ...)
{
....
throw CORBA::UNKNOWN();
....
}
when I commented out this throw, everything is going
well. CORBA::UNKNOWN is a child of CORBA::SystemException class, which
itself is child of CORBA::Exception class, which is a child of
CORBA::MagicChecker. The result is as long as I try to throw something
which inherits from CORBA::SystemException, or SystemException itself,
I get these error messages, when I try to throw something different,
it's ok. By something different I tried: 10, "Hej" and simple class:
class Foo
{
long value_;
public:
Foo()
: value_(0)
{}
};
The problem is, when I try to duplicate the same scenario in new
simplified sources, I've failed till the moment.
The produced assembly looks (problematic symbols):
.LEHB0:
call __cxa_throw@PLT
.....
.LEHB0:
call _ZN5CORBA12ORB_instanceEPKch@PLT
movl %eax, 4(%esp)
leal -72(%ebp), %eax
movl %eax, (%esp)
call _ZN6ObjVarIN5CORBA3ORBEEC1EPS1_@PLT
....
.LEHE0:
.LFE3898:
.size _Z14mico_sii_throwPN5CORBA13StaticRequestEz, .-_Z14mico_sii_throwPN5CORBA13StaticRequestEz
.section .gcc_except_table,"a",@progbits
....
.LEHE0:
leal -72(%ebp), %eax
movl %eax, (%esp)
BTW: _Z14mico_sii_throwPN5CORBA13StaticRequestEz leads me to the
problematic piece of code...
Any idea/hint what other should I try?
Thanks a lot,
Karel
PS: BTW: When I workaround this issue with:
#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4
assert(0);
#else
throw CORBA::UNKNOWN();
#endif
I'm able to compile sources in orb directory into libmico.so in about
3m56s, fyi: the same task with gcc2.95.4 takes 6m0s, gcc3.3 takes
10m37s and finally gcc 3.2.3 takes 12m28s. gcc3.4 w/o pch takes 9m33s
and my development compiler comeau 4.3.1 takes (w/ pch) 5m41s. So as
you can see gcc 3.4 is the fastest from compilers available to me and
so I would like to give it a try for our own development...
--
Karel Gardas kgardas@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com