This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: versioning of _Unwind_*() symbols
On Thu, Apr 22, 2004 at 04:50:43PM -0700, David Mosberger wrote:
> >>>>> On Thu, 22 Apr 2004 19:34:26 -0400, Daniel Jacobowitz <drow@false.org> said:
>
> Daniel> On Thu, Apr 22, 2004 at 04:15:12PM -0700, H. J. Lu wrote:
> >> On Thu, Apr 22, 2004 at 03:12:32PM -0700, David Mosberger wrote:
> >> > >>>>> On Thu, 22 Apr 2004 15:02:15 -0700, "H. J. Lu" <hjl@lucon.org> said:
>
> >> > HJ> BTW, since the ABI library is more than just unwind library. We
> >> > HJ> can't use David's unwind library as is.
>
> >> > You can. Just list -lunwind as a dependency as is done now with libgcc_s.
> >> I don't think it will work AS IS since linker may add libunwind.so to
> >> DT_NEEDED if it is used. A new linker option may be needed to work
> >> with it.
>
> Daniel> Are you sure that that will happen? I don't think so.
>
> I think HJ is right. I did try with an older GCC release that was
> built with libunwind enabled. The unwind library showed up as a
> dependency of the executable even though the linker command line did
> not specify -lunwind explicitly. Perhaps it's a linker bug?
>
The linker behavior is intentional. We can always add a new linker
switch to turn it off for the ABI library with something like
-Wl,--no-add-needed -lABI -Wl,--add-needed
H.J.