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: Add ALIGNOF


On Tue, Jun 12, 2007 at 11:04:21AM +0100, Nathan Sidwell wrote:
> Alan Modra wrote:
> >On Mon, Jun 11, 2007 at 09:32:10AM +0100, Nathan Sidwell wrote:
> 
> >>+	      new_abs (val / opb);
> >>+	    }
> >
> >I don't think you should be dividing by opb for ALIGNOF.
> 
> I must admit to being confused about opb and when it should be 
> divided/multiplied.  It seems to me that ALIGNOF and SIZEOF should return 
> the same units, and that implies dividing for both (or not dividing for 
> both).
> 
> What reason would there be for not dividing the ALIGNOF case?

alignment_power is in (log2) bytes (a byte being the minimum
addressable unit), size in octets.  See usage in
ldlang.c:size_input_section.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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