[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Symbol collision
From: |
Karl Berry |
Subject: |
Re: [Bug-gnulib] Symbol collision |
Date: |
Thu, 10 Jul 2003 10:25:59 -0400 |
Hi Simon,
It occured to me that if some of these functions happen to be included
in both libraries, e.g. strdup, won't linking an application to both
libraries break?
Maybe I'm the one who's basically confused, but I was under the
impression that a given symbol could be defined in fifty libraries, and
it wouldn't matter. The one linked with first on the cmdline is the one
that wins. No errors, no warnings. (Of course, .o's are different than
libraries in this regard.) I admit I haven't explicitly tested this in
some years. I know it was true for .a libraries.
And this is a good thing. Otherwise, every single symbol in every
single library would have to be unique. That does not seem practical to
maintain to me.
I seem to recall that we discussed the general idea of gnulib prefixes
before, and that the outcome was that we didn't want them, but I don't
remember the context or the details. There might be something in the
archives if you feel like digging, although I'm not sure it will be
relevant to the question at hand.
Sorry I can't be more definitive, but at least my making stupid
statements is likely to elicit corrections from the others :).
k