This is the mail archive of the gcc@gcc.gnu.org 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: Shared library annoyance with gcc-3_0-branch




On Tue, 20 Feb 2001, Richard Henderson wrote:
>
> On Mon, Feb 19, 2001 at 06:25:37PM -0800, Linus Torvalds wrote:
> > Is there any real reason why libgcc can't just be statically linked?
> 
> Yes.  There must be exactly one copy of the exception handling
> routines in use within a program.

Ugh. It just seems fairly clear that _whatever_ gcc does with shared
libraries, it will be an disaster for some people with quite reasonable
setups.

Clearly, it's entirely reasonable to want to run a binary on a machine
that does not even have the compiler. Which implies that any setup that
puts the shared library in the compiler directories is broken.

And this is entirely regardless of whether gcc is the "system compiler" or
not. That whole argument is a total red herring. 

Which means that the library would pretty much have to be in some "system"
location. But there are obviously people who disagree with that notion
too.

The advantage of shared linking is not so much the "sharedness", as the
fact that the "library" travels well with the binary, and the above two
problems go away.

Off-the-wall crazy idea: Would it perhaps be possible to have the library
in an executable ELF section or something - not really actively linked
into the binary, but at the same time easily accessible by the run-time
loader if needed?

You already have to have loader support for C++ exception tables etc, so
without actually knowing much about the details it sounds like the
infrastructure for something like this should all be in place already?

Ok, you can start berating me now.

		Linus


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