From: LIU Hao <lh_mouse@126.com>
To: cygwin@cygwin.com
Subject: Alignment of .text sections in object files
Date: Mon, 23 May 2022 21:01:56 +0800 [thread overview]
Message-ID: <c959b78a-d2b1-87a1-5ec3-cf7c3ffd871e@126.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 900 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next reply other threads:[~2022-05-23 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 13:01 LIU Hao [this message]
[not found] ` <CALwydEsLmkC2FpSeXdc4Jkb_X48DjZ=KH6e+QB0nyFUwb79RAg@mail.gmail.com>
2022-05-24 4:33 ` LIU Hao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c959b78a-d2b1-87a1-5ec3-cf7c3ffd871e@126.com \
--to=lh_mouse@126.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).