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]

linux libio solution


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~


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