public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Markus Engel <m_engel@cs.uni-kl.de>
To: elfutils-devel@lists.fedorahosted.org
Subject: Misinterpreted FILE note for 32bit core files in readelf
Date: Thu, 10 Apr 2014 10:42:17 +0200	[thread overview]
Message-ID: <53465969.1050005@cs.uni-kl.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

For 32bit core files, the FILE note is misinterpreted (tested in Version 
0.158 and git with readelf being a 64 and 32 bit binary), here is an 
example output:
CORE                  72  FILE
     2 files:
       00000000-080eb000 36d67b6ccd38000 135180288    gel/z/a.out
     Not enough data in NT_FILE note.

In readelf.c:handle_file_note, count and page_size are already 
interpreted as 64 bit values, which advances ptr by 2*8 instead of 2*4.
I traced this further to buf_read_ulong, where u has a size of 8, which 
is given to convert, returning data + 8.
Besides tracing these things I don't know how to fix it, mostly because 
I don't know where exactly things go an unintended way :)

Regards,
Markus

             reply	other threads:[~2014-04-10  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  8:42 Markus Engel [this message]
2014-04-10 11:55 Mark Wielaard
2014-04-10 13:11 Mark Wielaard
2014-04-14 12:57 Petr Machata
2014-04-14 13:28 Mark Wielaard

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=53465969.1050005@cs.uni-kl.de \
    --to=m_engel@cs.uni-kl.de \
    --cc=elfutils-devel@lists.fedorahosted.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).