If I have a function, say
int abc() {}
what does gcc/g++ change the abc symbol to? From what I can gather (by looking at tutorials and the like) it should be _abc, but I cannot get that to work.
I have the following assembly code:
[BITS 32]
[global start]
[extern _abc]
start:
call _abc
But I get linker errors along the lines of: undefined reference to _abc, even though Im linking the object file generated after compiling my C++ code.
By looking at the outputted assembly, I found it calls it something along the lines of __Z6abcv but when changing _abc to that in the assembly file, it gives me a simular error.
Anything I have missed/should know or any tips to help me solve this problem would be greatly appreciated.