This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: evolution vs prelink on debian ppc sid


On Thu, Sep 26, 2002 at 10:40:10AM -0400, Daniel Jacobowitz wrote:
> On Thu, Sep 26, 2002 at 01:29:55AM +0200, Jakub Jelinek wrote:
> > On Wed, Sep 25, 2002 at 06:45:01PM -0400, Jack Howarth wrote:
> > >    Here is another view at the prelinked evolution crash.
> > > If I run...
> > > 
> > > 0x018efaf4 in _dl_addr () from /lib/libc.so.6
> > > (gdb) bt
> > > #0  0x018efaf4 in _dl_addr () from /lib/libc.so.6
> > > #1  0x023816c4 in dladdr () from /lib/libdl.so.2
> > 
> > Well, I see a potential problem in _dl_addr:
> >   /* We assume that the string table follows the symbol table, because
> >      there is no way in ELF to know the size of the dynamic symbol table!!  */
> > prelink doesn't guarantee this for binaries, so if dladdr were used to find a
> > non-existant symbol in the executable, it might be a problem.
> > 
> > But it looks like this is not the case in your crash.
> 
> Actually, I think that is the case - didn't Jack mention some missing
> symbol errors that were handled gracefully without prelink?

Well, I asked Jack to at least p *match. If it is main binary, then yes,
this might be the case. If not, then it is something else.

> [Also, is that comment correct?]

Do you mean if there is some way how to know the size of the dynamic
symbol table? Yes, by inspecting section table. But that's not something
dladdr can do.
It can of course fail on the first invalid symtab entry, where invalid
is e.g. something which has st_name bigger than dynamic[DT_STRSZ],
or it can stop when reaching the minimum of DT_RELA, DT_REL, DT_HASH,
DT_STRTAB, DT_JMPREL, DT_INIT, DT_INIT_ARRAY, DT_FINI_ARRAY,
DT_PREINIT_ARRAY, DT_GNU_CONFLICT, DT_GNU_LIBLIST, DT_VERSYM, DT_VERDEF
and DT_VERNEED dynamic tags which are bigger than DT_SYMTAB tag.
Wonder what sense it makes to have DT_SYMENT tag which nobody uses
and why DT_SYMSZ is missing.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]