Removal of GCC/GAS tailing .code segment NOP padding ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: gcc-help@xxxxxxxxxxx
- Subject: Removal of GCC/GAS tailing .code segment NOP padding ?
- From: "Darryl L. Miles" <darryl-mailinglists@xxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 09:21:10 +0000
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.0.8) Gecko/20061109 SeaMonkey/1.0.6
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
[Index of Archives]
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]