public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Darryl L. Miles" <darryl-mailinglists@netbauds.net>
To: gcc-help@gcc.gnu.org
Subject: Removal of GCC/GAS tailing .code segment NOP padding ?
Date: Wed, 22 Nov 2006 09:21:00 -0000	[thread overview]
Message-ID: <45641686.2010907@netbauds.net> (raw)


I have a piece of C code which has inline assembler __asm__ 
__volatile__(...) on Intel IA32.  This is the only function and C file 
and in the resulting object code.

When comparing the resulting object code to that generated by the system 
compiler/assembler to that generated by GCC, I find that GCC has 
inserted trailing NOP opcodes to pad the .code segment out to GCCs 
alignment policy.

Is it possible to make GCC emit a .code segment without add any trailing 
NOP instructions to pad the end ?  Note this is a different requirement 
to wanting to remove the function start alignment padding, if my code 
has two functions in I'd like to keep that padding but just remove the 
trailing padding in the .code segment.

My project is made up of a lot of files with small .code units in each 
and I'd like to leave the linker free to manage alignment requirements 
when building the resulting executable rather than force it to treat the 
.code segment as-is and include all that trailing padding which feels 
the wrong way to do things IMHO.

Darryl

                 reply	other threads:[~2006-11-22  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45641686.2010907@netbauds.net \
    --to=darryl-mailinglists@netbauds.net \
    --cc=gcc-help@gcc.gnu.org \
    /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).