#define GEN_ENTRY(name) ALIGN_TEXT; .globl CNAME
(name); \
.type CNAME(name),@function; CNAME(name):
Is this AT&T syntax? I read through the gas manual, but I can't find what is this mean.
Thanks for your help
some problem about freebsd kernel assembly
Re:some problem about freebsd kernel assembly
I do know it creates a global function,but the syntax is special. For example what is the @function mean? Is freebsd kernel assembly syntax is different from gas.
Re:some problem about freebsd kernel assembly
Looks like GAS to me, I'm reasonably sure they use GCC (and therefore GAS). [Especially since #define() means that it is being run through the GCC preprocessor (or at least some preprocessor)]
I believe .type is an ELF directive because ELFs support distinguishing between Data and functions, @function most likely just declares that it is code not data.
I believe .type is an ELF directive because ELFs support distinguishing between Data and functions, @function most likely just declares that it is code not data.
Re:some problem about freebsd kernel assembly
Thanks for your help! I find the reason. The gas with FreeBSD is not the same as GNU's. It has its owm syntax. And the edition is 2.15.