On Tue, Jan 29, 2002 at 07:30:47PM +0200, Alexei Khlebnikov wrote: > On Tue, 29 Jan 2002 11:03:02 -0500 (EST) > "Christopher C. Chimelis" <[EMAIL PROTECTED]> wrote: > > CCC> On Tue, 29 Jan 2002, Daniel Jacobowitz wrote: > > >> > I have a problem: my shared library cannot be linked, because it's too > >> > big (all objs are 140 megs in size). I compile sources with "-g" option. > >> > As I understand, g++ produces level 2 debug info in stubs+ format. > >> > > >> > I want to use breakpoints and see stack backtraces. Can I switch > >> > to level 1 info? (I guess: no.) > > I guessed right? (I've read 'man gcc', but not sure about my english.) > > >> > > >> > What debug info format is smaller and easier (linker consumes less > >> > memory) > >> > to link? > > Anyway, does someone know the answer? > > >> Why can't you link it? Just because it's big shouldn't stop anything. > >> What platform is this? > > ia32: PentiumII-233, 128M RAM. > > CCC> I'll second this. I've linked some large files (circa 500MB) with stabs+ > CCC> info without a problem. If you're bent on using stabs and not stabs+, > CCC> though, you can compile the files with -gstabs. See the gcc docs before > CCC> doing this, though, as there are some caveats if you're using gdb. > > Can it help? I need half a day to recompile my lib. > > > When I link it (I give a command > "g++-3.0 -o my_big_lib.so -lother_not_so_small_libs many_obj_files.o" > ), I get the following error: > > some_my_obj_file.o: could not read symbols: Memory exhausted > collect2: ld returned 1 exit status > > When I do the same on 512M RAM -machine, the linking succeeds.
You should add swap space in that case. And: > Note that /etc/security/limits.conf contains these lines: > * hard data 100000 > * hard rss 100000 > * hard stack 100000 > * hard as 100000 > (limiting memory use to 100000 Kbs to prevent lockups). after adding swap space increase the limits. > Where can I find any docs on debug info formats comparison? gcc docs just say > "this format used in old System V systems", "this format used in old BSD > systems". > It may be interesting for historics, but do not help in my case. Stabs is the more compact of your alternatives. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer