public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Removal of GCC/GAS tailing .code segment NOP padding ?
@ 2006-11-22  9:21 Darryl L. Miles
  0 siblings, 0 replies; only message in thread
From: Darryl L. Miles @ 2006-11-22  9:21 UTC (permalink / raw)
  To: gcc-help


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-22  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-22  9:21 Removal of GCC/GAS tailing .code segment NOP padding ? Darryl L. Miles

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).