public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Jacob Burkholder <jake.burkholder2@gmail.com>
To: Mark Wielaard <mark@klomp.org>
Cc: Milian Wolff <mail@milianw.de>, elfutils-devel@sourceware.org
Subject: Re: runtime validation of DT_SYMTAB lookups - why is there no DT_SYMSZ?
Date: Sat, 27 Aug 2022 23:41:00 -0700	[thread overview]
Message-ID: <CAOE-m4BA_9YsaZvxBTE_Sri45x2+SPg8-p_Nhti6SJRVfRXonQ@mail.gmail.com> (raw)
In-Reply-To: <198e9e0414a04b741baa865c856534a6171504c9.camel@klomp.org>

I've always used the fact that the symbol table and string table are
present in the binary in that order and adjacent to each other to find
the number of symbol table entries., ie (strtab - (char *)symtab) /
sizeof(*symtab), although clearly this is not required and may just be
gnu ld convention.  DT_SYMSZ would be a useful addition to the ELF
standard IMO.

      reply	other threads:[~2022-08-28  6:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 16:40 Milian Wolff
2022-07-26 15:28 ` Mark Wielaard
2022-07-27 11:38   ` Milian Wolff
2022-07-28 16:41     ` Mark Wielaard
2022-08-28  6:41       ` Jacob Burkholder [this message]

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=CAOE-m4BA_9YsaZvxBTE_Sri45x2+SPg8-p_Nhti6SJRVfRXonQ@mail.gmail.com \
    --to=jake.burkholder2@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=mail@milianw.de \
    --cc=mark@klomp.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).