[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/24942] objcopy: Add option for setting section alignment
From: |
i at maskray dot me |
Subject: |
[Bug binutils/24942] objcopy: Add option for setting section alignment |
Date: |
Tue, 24 Sep 2019 03:18:36 +0000 |
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/24942] objcopy: Add option for setting section alignment, maskray at google dot com, 2019/09/17
- [Bug binutils/24942] objcopy: Add option for setting section alignment, maskray at google dot com, 2019/09/17
- [Bug binutils/24942] objcopy: Add option for setting section alignment, profclonk at gmail dot com, 2019/09/17
- [Bug binutils/24942] objcopy: Add option for setting section alignment,
i at maskray dot me <=
- [Bug binutils/24942] objcopy: Add option for setting section alignment, jh7370 at my dot bristol.ac.uk, 2019/09/24
- [Bug binutils/24942] objcopy: Add option for setting section alignment, profclonk at gmail dot com, 2019/09/24
- [Bug binutils/24942] objcopy: Add option for setting section alignment, i at maskray dot me, 2019/09/25