Andes Workshop
https://forum.andestech.com/

How to align functions?
https://forum.andestech.com/viewtopic.php?f=25&t=940
Page 1 of 1

Author:  ianfeng [ Thu Oct 01, 2015 3:10 pm ]
Post subject:  How to align functions?

Use GCC compiler option "-falign-functions=n":
Align the start of functions to the next power-of-two greater than n.

"-fno-align-functions" and "-falign-functions=1" are equivalent and mean that functions will not be aligned.

"-O2" and "-O3" optimization will turn on this flag.
"-Os" optimization will disable it.

Andes GCC compiler provide option "-malign-functions" to align all functions to the next 4-bytes boundary.

Note:
Functions in library may not be aligned to 4-bytes boundary.

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/