https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101459
--- Comment #3 from ashimida <ashimida at linux dot alibaba.com> --- (In reply to Richard Biener from comment #2) > The flag, -falign-functions is only enabled at -O2+ (but not -Os), but the > actual alignment is recorded in the 'align_functions' data which is only > populated when -falign-functions is specified so I think it works as > documented. I tested this option in gcc 7.5.0 and 9.2.0, with the source code: int func1(void) { return 0; } int func2(void) { return 0; } int main (void) { return 1; } and the result is like: ashimida@ubuntu:~/test1$ aarch64-linux-gnu-gcc -falign-functions=128 -O0 test.c -o test ashimida@ubuntu:~/test1$ readelf -s test|grep fun 63: 0000000000000780 8 FUNC GLOBAL DEFAULT 13 func1 78: 0000000000000800 8 FUNC GLOBAL DEFAULT 13 func2 ashimida@ubuntu:~/test1$ aarch64-linux-gnu-gcc -O0 test.c -o test ashimida@ubuntu:~/test1$ readelf -s test|grep fun 63: 00000000000006e4 8 FUNC GLOBAL DEFAULT 13 func1 78: 00000000000006ec 8 FUNC GLOBAL DEFAULT 13 func2 so I think this flag is also worked at -O0