This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Backtrace_symbols and .symtab
- From: Andreas Jaeger <aj at suse dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Thu, 23 Oct 2014 09:23:29 +0200
- Subject: Re: Backtrace_symbols and .symtab
- Authentication-results: sourceware.org; auth=none
- References: <5447C4FF dot 7090507 at samsung dot com> <5447D7C0 dot 80705 at samsung dot com>
On 10/22/2014 06:13 PM, Yury Gribov wrote:
> On 10/22/2014 06:53 PM, Yury Gribov wrote:
>> Hi all,
>>
>> Current backtrace_symbols(3) tries to read names of functions in call
>> stack from .dynsym which is usually very sparse compared to ordinary
>> symbol table in .symtab. Even if application is linked with -rdynamic
>> (which may be undesirable due to pollution of dynamic namespace, etc.),
>> .dynsym won't contain static functions, etc.
>>
>> Has anyone considered making backtrace_symbols more .symtab-friendly
>> e.g. allowing users to prefer .symtab to .dynsym if it's available (*)?
>> This would of course be less (probably much less) efficient because
>> .symtab search would be linear (compared to hash table available for
>> .dynsym) but I can imagine usecases where this would be acceptable e.g.
>> printing friendly backtraces on error. AFAIK currently some projects
>> link against libunwind and elfutils for the sole purpose of getting
>> readable backtraces which should be available with glibc.
>>
>> -Y
>>
>> (*) ./elf/sprof.c already does something like this.
>>
>
> Cc-ed Andreas (though he has just announced that he won't work on glibc
> anymore...).
I'm still on the mailing list, no need to CC me.
Sorry, can't help here,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 NÃrnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix ImendÃrffer,HRB16746 (AG NÃrnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126