https://sourceware.org/bugzilla/show_bug.cgi?id=24942

--- Comment #9 from Fangrui Song <i at maskray dot me> ---
I don't require the support for non power-of-2 alignment. I just want to say
--set-section-alignment .foo=8 => sh_addralign=256  is counterintuitive. It is
not what readelf -S displays. (objdump -h displays it as `2**8`. The `**` at
least makes it clear that an exponent is involved.)

> I think not all BFD targets support arbitrary alignment, some may only 
> support powers of 2.

We can simply reject non power-of-2 alignment when parsing the command line
option, like what you've done when there is no string on the right of `=`

> The ".align" directive also works this way (at least on ARM).

I know that the .align directive is in powers of 2 on ARM/AArch64/MIPS/PowerPC,
but it is in bytes on x86, Sparc and System z. I don't know how this
inconsistency came, .balign and .p2align may be better.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to