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: How to pad a section to an aligned size in the linker script file


On Thu, Jul 14, 2011 at 12:38:13PM +0100, R. Diez wrote:
> 1) Instead of LONG(0), use some directive to reserve the space, but not fill it.

. = ALIGN(4);

or if you want to be a little more fancy

. = ALIGN(. != 0 ? 4 : 1);

-- 
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]