This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How gcc handles alignment options
- From: Ian Lance Taylor <ian at airs dot com>
- To: Wei Hu <glegoo at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 15 Jan 2005 22:02:28 -0500
- Subject: Re: How gcc handles alignment options
- References: <5be02598050115102438693bed@mail.gmail.com>
Wei Hu <glegoo@gmail.com> writes:
> We know that GCC has options that control optimization. What I tried
> to do was to align functions with the -falign-functions option.
> However I noticed that this option only controls the user code,
> without affecting the library instructions.
Correct. The option only affects compilation. It does not affect
linking.
> Although finally I modified linker script to fulfill my goal. I still
> want to know how gcc handles the alignment options?
> I guess it does so by passing some option to ld.. But why doesn't the
> option affect the libraries?
-falign-functions doesn't pass anything to ld. It just inserts .align
pseudo-ops to cause each function being compiled to be aligned.
Ian