toc:GCC

toc:GCC

选项 #

-fno-builtin -fno-common -ffunction-sections -fpic和-fPIC -fomit-frame-pointer -Wl,-export-dynamic rpath(GCC Option)

-S: 生成编译器产生的汇编代码。 -c: 编译或汇编源文件,但不链接(link)。生成的是对象文件(object file)。

attribute #

变量属性 #

GCC Manual: 6.34.1 Common Variable Attributes attribute((weak)) attribute((weakref)) aligned属性(GCC) packed属性(GCC)

函数属性 #

GCC Manual: 6.33.1 Common Function Attributes attribute((noreturn)) const属性会让编译器只调用该函数一次

sub:GNU C对标准C的扩展 sub:Shared Library