[PATCH] x86: Set alignment of output SEC_EXCLUDE section to 1
Alan Modra
amodra@gmail.com
Fri Nov 30 09:31:00 GMT 2018
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
More information about the Binutils
mailing list