Alignment of .text sections in object files
LIU Hao
lh_mouse@126.com
Mon May 23 13:01:56 GMT 2022
Good evening, cygwin folks.
A few days ago, I had noticed that when targeting Windows and optimizing for size, GAS always output
object files containing .text sections with an alignment of 16 bytes (which could be increased, but
not decreased), unlike when targeting Linux where .text sections had an alignment of 1byte.
I then filed a bug report against GAS [1]. The conclusion was 'unfortunately this is required by the
PE specification, so it cannot be changed.' I expressed by doubt, and got 'I would suggest that you
ask about this on the cygwin mailing list as there are many PE experts there.' So my question is, is
it really necessary for .text sections in object files to be aligned to 16-byte boundaries? And
could you please kindly elaborate it a little? Thanks in advance.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29145
--
Best regards,
LIU Hao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://cygwin.com/pipermail/cygwin/attachments/20220523/c37c831b/attachment.sig>
More information about the Cygwin
mailing list