bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/29145] GAS always generates padding instructions regardless of


From: lh_mouse at 126 dot com
Subject: [Bug gas/29145] GAS always generates padding instructions regardless of `--no-pad-sections`
Date: Mon, 23 May 2022 13:27:59 +0000

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

--- Comment #5 from LIU Hao <lh_mouse at 126 dot com> ---
On the page you've referenced, there is

> 20 4 PointerToRawData
> The file pointer to the first page of the section within the COFF file. 
> For executable images, this must be a multiple of FileAlignment from the 
> optional header. For object files, the value should be aligned on a 4-byte 
> boundary for best performance. When a section contains only uninitialized 
> data, this field should be zero.
which says raw data '_should_ be aligned on a 4-byte boundary', and may imply
that other alignments are acceptible as well.


There is also the section flag

> IMAGE_SCN_ALIGN_1BYTES 0x00100000
> Align data on a 1-byte boundary. Valid only for object files.
which says explicitly that data in object files may be aligned to a 1-byte
boundary i.e. not aligned at all.


Therefore I suspect it is doable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]