bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/2467] "ar q" / ranlib has large memory use (linear in arch


From: dcoutts at gentoo dot org
Subject: [Bug binutils/2467] "ar q" / ranlib has large memory use (linear in archive size)
Date: 17 Mar 2006 16:25:49 -0000

------- Additional Comments From dcoutts at gentoo dot org  2006-03-17 16:25 
-------
The reason that bfd_free_cached_info does nothing is because on elf targets it
is #defined to be _bfd_generic_bfd_free_cached_info which is #defined to be
bfd_true.

As a complete hack I tried calling this instead of bfd_free_cached_info:
          bfd_hash_table_free (&current->section_htab);
          objalloc_free ((struct objalloc *) current->memory);

This works. That is the memory use remains relatively constant and the resulting
archive is the byte for byte the same as an unpatched ranlib.

Now obviously this is a hack, we shouldn't be using this target-specific code in
target-independent code like archive.c. Perhaps we could have something along
these lines in bfd_free_cached_info on elf targets.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2467

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]