[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: Improve addr2line symbol conversion
From: |
Gordon Chaffee |
Subject: |
Patch: Improve addr2line symbol conversion |
Date: |
Sun, 29 Sep 2002 12:27:12 -0700 (PDT) |
Right now, addr2line does not use dynamic symbols when it does address
to function conversions. This patch checks if there are no non-dynamic
symbols, then it uses the dynamic symbols for doing address to function
conversion.
- Gordon
--- binutils-2.12/binutils/addr2line.c.orig Wed Jan 23 08:12:55 2002
+++ binutils-2.12/binutils/addr2line.c Sun Sep 29 11:30:36 2002
@@ -95,19 +95,16 @@
slurp_symtab (abfd)
bfd *abfd;
{
- long storage;
long symcount;
+ unsigned int size;
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
return;
+ symcount = bfd_read_minisymbols (abfd, 0 /* dynamic */, (PTR) &syms, &size);
+ if (symcount == 0) {
+ symcount = bfd_read_minisymbols (abfd, 1 /* dynamic */, (PTR) &syms,
&size);
+ }
- storage = bfd_get_symtab_upper_bound (abfd);
- if (storage < 0)
- bfd_fatal (bfd_get_filename (abfd));
-
- syms = (asymbol **) xmalloc (storage);
-
- symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: Improve addr2line symbol conversion,
Gordon Chaffee <=