I had the following C code:
void test_func()
{
__asm__ ("mov $0x2,%rax");
__asm__ ("mov $0x6000dd,%rdi");
__asm__ ("mov $0x0,%rsi");
__asm__ ("syscall");
}
int main(int argc, char *argv[]) {
test_func();
return 0;
}
when I compile it like this gcc mine.cxx -S -no-pie
I get in assembly file the following:
.globl _Z9test_funcv
Why does the name of my function change and how to prevent this / predict its new name?