linux libio solution
H.J. Lu
hjl@lucon.org
Thu Oct 9 09:26:00 GMT 1997
>
> 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?
I am not sure if it will work very. Have you tried mixed stdio/iostream
code? Are they in sync. For Linux, cout == stdout.
I will try to find a kludge this weekend.
H.J.
More information about the Gcc
mailing list