public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@gmx.de>
To: binutils@sourceware.org
Cc: amodra@gmail.com
Subject: Re: [PATCH v3 0/2] Fix several mix up between octets and bytes in ELF program headers
Date: Sun, 16 Feb 2020 19:37:00 -0000	[thread overview]
Message-ID: <5653117.1aehKcCLEe@zbook-opensuse.wgnetz.xx> (raw)
In-Reply-To: <1780888.ZH1UJr1WQh@zbook-opensuse.wgnetz.xx>

Dear Alan,

some hours after my previous message I became doubtful whether the current
state is correct. As SDMA will be the first ELF target with opb>1, I see a
chance for getting things right before more targets appear and everything is
cemented.

Am Sonntag, 16. Februar 2020, 09:22:22 CET schrieb Christian Eggers:
> On Wed, 18 Dec 2019 12:42:57 +1030, Alan Modra wrote:
> > I'm also wondering about relocations, symbols and dynamic tags with
> > address values.
>
> I'm unsure whether I can answer this questions correctly because currently
> "it simply works for me". But I will try...
>
> > Does r_offset specify bytes or octets in the ELF file?
>
> > How about r_addend
>
> > and st_value?

As SEC_ELF_OCTETS is only available for BFD programs, mixing bytes and octets
in the external representation (ELF) maybe a poor decision.

Initially everything was in bytes, but this wasn't suitable for DWARF
information as these are only representable in octets. In order to get around
this, I introduced SEC_ELF_OCTETS, which helped to keep the internal
representation (VMA/LMA) in bytes.

But for the ELF file, every program handling it must know which information is
in octets or in bytes. For luck, the sizes are already in octets, otherwise I
had already trouble with external software. But probably everything should be
stored in octets, at least this should resolve the trouble I already have with
my external debugger. This debugger has only one symbol space for ARM and
SDMA. Having symbols (and debug line info) in octets should make nasty
workarounds needless.

What is your opinion?

Regards
Christian



  reply	other threads:[~2020-02-16 19:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15 19:37 Christian Eggers
2020-02-16  8:22 ` Christian Eggers
2020-02-16 19:37   ` Christian Eggers [this message]
2020-02-20  1:30     ` Alan Modra
2020-02-22 16:32       ` Christian Eggers
2020-02-22 21:08       ` Christian Eggers
2020-02-23  9:07       ` Christian Eggers
2020-02-27  8:35         ` Alan Modra
2020-03-07 21:05           ` Christian Eggers
2020-02-23 18:35       ` Christian Eggers

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=5653117.1aehKcCLEe@zbook-opensuse.wgnetz.xx \
    --to=ceggers@gmx.de \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.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).