From: Jan Beulich <jbeulich@suse.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: RFC: Objcopy: Section alignment
Date: Thu, 28 Mar 2024 17:57:03 +0100 [thread overview]
Message-ID: <8da57131-e1bd-488d-8e76-7cb94ce925b0@suse.com> (raw)
In-Reply-To: <bd4753e2-2e15-4c71-800b-ea1ff7adc095@redhat.com>
On 28.03.2024 14:08, Nick Clifton wrote:
> Hi Jan,
>
>>> Any further comments ?
>>
>> Actually, there are: First, is the last doc hunk still applicable /
>> appropriately worded? "ensures" in particular I'm not sure about.
>>
>> Perhaps related to that, the two new diagnostics look more like
>> errors than warnings to me. I think those ought to be just warnings
>> (by default at least), especially also with the FIXME for the LMA
>> related code. Which would in particular mean to not bail early from
>> setup_section(), and perhaps also to not set "status" to non-zero.
>>
>> Further, while the new power_of_two() is merely split out code,
>> that code doesn't (already didn't before) deal with 0 properly. It
>> would spin indefinitely then afaict, rather than reporting "not a
>> power of two".
>>
>> Finally, in the new --section-alignment related diagnostic, wouldn't
>> you better mention the option name, and not the internal variable's?
>
> All very good points. Plus I also realised that I had not included a
> testcase to check the new behaviour. 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? And didn't Alan, not so long ago, remove its
propagation into PE binaries? (This then also being a reason why the
alignment values weren't dumped for PE.)
Jan
> But it seems that this function does
> not set the necessary IMAGE_SCN_ALIGN_xxx flag in the section's header.
>
> So here is a v3 patch with all of these bugs corrected.
>
> Cheers
> Nick
>
next prev parent reply other threads:[~2024-03-28 16:57 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 [this message]
2024-04-02 8:45 ` Nick Clifton
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=8da57131-e1bd-488d-8e76-7cb94ce925b0@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.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).