assembly - GAS what does @ and .type do? -
i reading following code online. wondering @ symbol next function call means. wondering .type exactly. can point me url explains different .types?
.section .rodata lhello: .asciz "hello!" .section .text .globl somerelocations .type somerelocations, stt_func somerelocations: leaq lhello(%rip), %rdi call puts@plt ret
the ".type" keyword place information object file generated saying "somerelocations" of type stt_func (which means: function).
the linker and/or debuggers may use information. on cpus (such arm variants tht support both thumb , arm modes) linker must know if "somerelocations" function or variable because linking done bit differently functions , variables in case.
for assembler "@" regular character @ point. "puts@plt" processed assembler same way "putsxplt" processed.
to unprecise: when position-independent file being generated linker requires "@plt" added function names.
Comments
Post a Comment