"Wu .Shao Lin" <shao.lin.wu@xxxxxxxxx> writes: > I am playing with C, and have tried the -freorder-functions with > __attribute__((hot)), it works some but the link only reorder the > functions that in one object file range , Is there any way to ask link > to reorder the functions in whole executive file range? If you are using the gold linker you can use the --section-ordering-file option. You should use -ffunction-sections to give each function its own section. > Can I name the functions (C code) to other code segments (instead > of .text by default)? Sure. See __attribute__ ((section (xxx))). See also gcc's -freorder-blocks-and-partition option. Ian