public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: binutils@sourceware.org
Subject: Re: Commit: objdump --show-all-symbols: show extra symbols matching referenced addresses
Date: Wed, 3 Apr 2024 10:55:09 +0100	[thread overview]
Message-ID: <67f4b1af-fbe5-4587-8257-0184072862d1@redhat.com> (raw)
In-Reply-To: <mvm5xwyeq2g.fsf@suse.de>

Hi Andreas,

>>>> +  /* If we found an absolute symbol in the reloc (ie: "*ABS*+0x....")
>>> Is the addend always formatted as an unsigned number?
>>
>> Err, yes ?
>>
>> To be honest I am not 100% sure.  Possibly on architectures with a signed
>> address space there could be a negative value in the relocation symbol.
> 
> Nothing stops the object from using addresses from the upper end of the
> address space.
> 
> $ tail -1 /proc/self/maps
> ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]

Right, but if the address space itself is unsigned then any relocations
against locations in the upper end of the space will themselves be
unsigned.  Full of f's and looking like a negative number, but actually
a large, positive, unsigned number.

But hey, I have only just written this code, so I am quite willing to
believe that there are bugs in it.  Do you know of an example of a
relocation against an upper end address that I could use to investigate
further ?

Cheers
   Nick



      reply	other threads:[~2024-04-03  9:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  9:08 Nick Clifton
2024-04-03  9:17 ` Andreas Schwab
2024-04-03  9:37   ` Nick Clifton
2024-04-03  9:46     ` Andreas Schwab
2024-04-03  9:55       ` Nick Clifton [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=67f4b1af-fbe5-4587-8257-0184072862d1@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=schwab@suse.de \
    /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).