This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: Set alignment of output SEC_EXCLUDE section to 1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]