public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* linux libio solution
@ 1997-10-08 21:19 Richard Henderson
  1997-10-09  9:26 ` H.J. Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 1997-10-08 21:19 UTC (permalink / raw)
  To: egcs

I've just successfully built a version lib libstdc++ on Linux/Alpha
against stock Red Hat libraries.  The technique I used is applicable
to all of the Linux libio problems.

We build all of libio, ld -r it into one big .o, and use objcopy to
make all of the non-iostreams symbols local, so that (1) they are
not exported and (2) the iostreams functions are forced to use the
local copy.  The drawback is that "cout << 1" now includes a 2M
object file.  The mitigating factor is that if you use shared libs,
you won't notice.

At the moment, I've done this by hand, and so still need to turn it
into something that can be used in a Makefile.  Further, I had to
modify binutils to add the privitization option (5 lines of code).

Our choice here is either (1) require a binutils snapshot [eww], or
(2) write a special program that tinkers with ELF symbol tables
directly, and include that in the distribution.

Shall I be writing that special program, then?


r~

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: linux libio solution
@ 1997-10-10 11:44 Paul Koning
  1997-10-10 20:46 ` Joe Buck
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Koning @ 1997-10-10 11:44 UTC (permalink / raw)
  To: egcs

>>>>> "Robert" == Robert Wilhelm <robert@physiol.med.tu-muenchen.de> writes:

 Robert> On Thu, Oct 09, 1997 at 08:15:57AM -0700, H.J. Lu wrote:
 >>  I am not sure if it will work very. Have you tried mixed
 >> stdio/iostream code? Are they in sync. For Linux, cout == stdout.
 >> 

 Robert> What's so important that stdio/iostream can be mixed?

I can think of several reasons.

1. It is documented as working.
2. It is used by many existing programs.
3. It is absolutely essential if you want to have mixed c/c++ code.

 Robert> This "feature" does not work on any other platform and has
 Robert> caused so much harm.

Huh? It absolutely DOES work on other platforms.  And what harm does
it cause?

 Robert> IMHO we should sacrifice it and provide to distinct
 Robert> implementations for libc and libstdc++.

NO.

	paul

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~1997-10-13 15:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-08 21:19 linux libio solution Richard Henderson
1997-10-09  9:26 ` H.J. Lu
1997-10-09  9:40   ` Richard Henderson
1997-10-09 15:53     ` H.J. Lu
1997-10-09 16:31       ` Richard Henderson
1997-10-09 16:40         ` H.J. Lu
1997-10-10  8:51   ` Robert Wilhelm
1997-10-10 11:44     ` Per Bothner
1997-10-10 17:19       ` Robert Wilhelm
1997-10-10 17:19         ` Per Bothner
1997-10-10 11:44 Paul Koning
1997-10-10 20:46 ` Joe Buck
1997-10-13 15:02   ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).