public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: RFC: Objcopy: Section alignment
Date: Tue, 2 Apr 2024 09:45:19 +0100	[thread overview]
Message-ID: <530c7e2e-ca49-4f11-99a7-25298b707a88@redhat.com> (raw)
In-Reply-To: <8da57131-e1bd-488d-8e76-7cb94ce925b0@suse.com>

Hi Jan,

>> Plus, as it turns out, I was
>> assuming that calling bfd_set_section_alignment() was enough to set
>> the alignment for a PE section.
> 
> Which also shouldn't be necessary? Isn't section alignment relevant for
> COFF objects only?

I am not sure.  But if it is not relevant for PE sections then shouldn't
changing the SectionAlignment field in the PE header generate an error if
any section's VMA does not match that alignment ?

> And didn't Alan, not so long ago, remove its
> propagation into PE binaries?

I must admit that I do not remember this, but it certainly could have happened.

> (This then also being a reason why the
> alignment values weren't dumped for PE.)

I think that we should not hide the alignment values from the user, even if
they are not going to be honoured.  We do not dictate the policy for the how
PE binaries are going to be treated by the OS, and there could be good
reasons for why a user needs to know them.

Cheers
   Nick


  reply	other threads:[~2024-04-02  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 14:55 Nick Clifton
2024-03-21 16:59 ` Jan Beulich
2024-03-26 12:44   ` Nick Clifton
2024-03-26 13:08     ` Jan Beulich
2024-03-28 13:08       ` Nick Clifton
2024-03-28 16:57         ` Jan Beulich
2024-04-02  8:45           ` Nick Clifton [this message]
2024-04-02  9:19             ` Jan Beulich

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=530c7e2e-ca49-4f11-99a7-25298b707a88@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).