This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] x86: Set alignment of output SEC_EXCLUDE section to 1
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 30 Nov 2018 20:01:48 +1030
- Subject: Re: [PATCH] x86: Set alignment of output SEC_EXCLUDE section to 1
- References: <20181129225736.19364-1-hjl.tools@gmail.com>
On Thu, Nov 29, 2018 at 02:57:36PM -0800, H.J. Lu wrote:
> To work around it, we set alignment of the output section to
> 1 if there is only one excluded input section.
This is a tricky problem to solve, and I suspect what you're doing
here is not correct in general, even for a single input section. For
example, what happens if the output section statement specifies
alignment?
I've faced something similar before on ppc64 with stub sections, and
the solution I found was to create the section with minimal alignment,
then increase to the desired alignment when the section is found to be
non-empty. That idea might work for you too.
--
Alan Modra
Australia Development Lab, IBM