libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

John David Anglin - Re: objc/2902: collect2 doesn't ...: libtool should


From: Bruce Korb
Subject: John David Anglin - Re: objc/2902: collect2 doesn't ...: libtool should use collect2?
Date: Thu, 24 May 2001 16:16:20 -0700

http://gcc.gnu.org/ml/gcc-bugs/2001-05/msg00749.html

This is the mail archive of the address@hidden 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]

Re: objc/2902: collect2 doesn't ...: libtool should use collect2?


> Executing on host: /xxx/gnu/gcc-3.0/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.0/objdir/gcc/ /xxx/gnu/gcc-3.0/gcc/testsuite/objc/execute/_cmd.m  -w  -O  -I/xxx/gnu/gcc-3.0/gcc/testsuite/../../libobjc -L/xxx/gnu/gcc-3.0/objdir/hppa1.1-hp-hpux10.20/libobjc/.libs  -lobjc -lm   -fPIC -o /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/_cmd.x
>   (timeout = 300)
> PASS: objc/execute/_cmd.m compilation,  -O
> objc runtime: cannot find class Object
> FAIL: objc/execute/_cmd.m execution,  -O

I started looking into the cause of the above.  The problem is caused
by using libtool rather than gcc to link libobjc.sl.  Libtool
directly invokes `ld' to link the objects in the shared library.  On the
otherhand, gcc under hpux will invoke collect2 to link the objects.
Collect2 will notice that the objects contain constructors/destructors
and add initializer and finalizer functions to the shared library.
When an application is linked with the shared library using gcc, collect2
will add these functions to the constructor/destructor list for the 
application and all will be well (hopefully).

This is a regression from the previous release which didn't use libtool.

Dave
-- 
J. David Anglin                                  address@hidden
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]