|
From: Josef W. <Jos...@gm...> - 2003-04-16 21:25:32
|
Hi, there is a problem with the reading of symbol table information: we currently read only one of "symtab" or "dynsym" section, whatever comes last in the ELF section list of a file. I thought intended behaviour was to fallback to dynsym only if symtab isn't available (as the comment says, too). Neverless, I think both tables should be read in. I have a library here (libfam.so on Suse 8.0), where the regular symtab holds only a few exported symbols (a C API), but the language is C++. Thus, the "dynsym" section contains a *lot* more symbols, especially "__builtin_new", too. As libfam.so is loaded first of all C++ library for any QT/KDE program here, every C++ object creation will call "__builtin_new" from libfam.so. Unfortunately, only symbols in "symtab" are loaded by Valgrind, so I only see "???" instead of "__builtin_new". Is there a problem when loading both tables with same symbols? Otherwise, I suggest a change... Josef |
|
From: Julian S. <js...@ac...> - 2003-04-16 22:27:45
|
Josef, I'm sure you understand more about this than me. Can you send a patch for it? J On Wednesday 16 April 2003 10:25 pm, Josef Weidendorfer wrote: > Hi, > > there is a problem with the reading of symbol table information: > we currently read only one of "symtab" or "dynsym" section, whatever comes > last in the ELF section list of a file. > I thought intended behaviour was to fallback to dynsym only if symtab isn't > available (as the comment says, too). > > Neverless, I think both tables should be read in. I have a library here > (libfam.so on Suse 8.0), where the regular symtab holds only a few exported > symbols (a C API), but the language is C++. Thus, the "dynsym" section > contains a *lot* more symbols, especially "__builtin_new", too. > > As libfam.so is loaded first of all C++ library for any QT/KDE program > here, every C++ object creation will call "__builtin_new" from libfam.so. > Unfortunately, only symbols in "symtab" are loaded by Valgrind, so I only > see "???" instead of "__builtin_new". > > Is there a problem when loading both tables with same symbols? > Otherwise, I suggest a change... > > Josef > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Josef W. <Jos...@gm...> - 2003-04-17 15:25:30
Attachments:
symtab.patch
|
Hi, On Thursday 17 April 2003 00:27, Julian Seward wrote: > Josef, I'm sure you understand more about this than me. Can you > send a patch for it? I'm not sure about this :-) Here's the tested patch. As there is the sorting and merging stuff after reading of symbols, duplications in both symbol tabs don't matter. To don't shuffle much code around, I used a while loop for first reading the normal, then the dynamic table. Josef |