From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 5/7] STT_GNU_IFUNC symbols reader
Date: Mon, 21 Mar 2011 21:15:00 -0000 [thread overview]
Message-ID: <m3oc54td7a.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110319211628.GF30867@host1.jankratochvil.net> (Jan Kratochvil's message of "Sat, 19 Mar 2011 22:16:28 +0100")
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> it is questionable if it should not reside in gdb/elf-ifunc.c (like
Jan> bfd/elf-ifunc.c). With the other patches it is over 400 LoC which
Jan> would make sense. Unfortunately it needs some internal functions
Jan> of elfread.c which would need to be exposed, probably via new
Jan> elfread.h etc., I have no problem with the split but I tried it
Jan> (one also needs to modify configure.ac for the ELF exception) and
Jan> the split was not too clean.
What you did seems fine to me.
Jan> The elf_objfile_gnu_ifunc_cache_data hash table was implemented as
Jan> minimal symbols before. But as these entries are found only during
Jan> the inferior runtime install_minimal_symbols has already finished
Jan> and there is no clean way how to add new minimal symbols, moreover
Jan> to make them visible for <tab>-completion etc. Therefore it is
Jan> only an internal GDB cache now.
Also ok by me.
Jan> I was considering whether to delay the SYMBOL_GOT_PLT_SUFFIX
Jan> minimal symbols (those from .got.plt) reading only for the case
Jan> first STT_GNU_IFUNC is needed. As the .got.plt section is
Jan> typically not big and there is rather needed an unrelated
Jan> optimization to make the symbols (incl. minimal symbols) reading
Jan> lazy and not to touch 150+ symbol files for LibreOffice when only
Jan> <5 of such files GDB needs to know I do not consider such
Jan> optimization relevant now. With the lazy symbol files reading even
Jan> the .got.plt reading will get optimized along. And for the few
Jan> really needed files it should not harm.
I agree.
Jan> Another issue is if it should not be rather located in OSABI. But
Jan> this is an ELF feature, which matches neither OS nor ARCH. Also
Jan> OSABI has no inheritance which makes implementation of such global
Jan> features a bit tedious. I am interested in the opinion on the
Jan> OSABI way.
It seems harmless to do it this way.
Jan> + htab = htab_create_alloc_ex (1, elf_gnu_ifunc_cache_hash,
Jan> + elf_gnu_ifunc_cache_eq,
Jan> + NULL, &objfile->objfile_obstack,
Jan> + hashtab_obstack_allocate,
Jan> + dummy_obstack_deallocate);
It seems just as easy to allocate the hash table so that rehashing
doesn't waste memory.
Tom
next prev parent reply other threads:[~2011-03-21 20:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-19 21:17 Jan Kratochvil
2011-03-21 21:15 ` Tom Tromey [this message]
2011-03-28 14:22 ` Jan Kratochvil
2011-03-28 19:52 ` Tom Tromey
2011-03-28 20:32 ` [commit] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3oc54td7a.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox