I have a bitcode file Y that has a symbol __isoc99_fscanf in it. When I disassemble the bitcode, the symbol is written as "\01__isoc99_fscanf". I am wondering where this symbol is coming from? I grep'ed throughout /usr on my machine for both names, and I only found __isoc99_fscanf, without the special character in front. Regardless of where the symbol is coming from, I am trying to write a wrapper function in C, for each external function called in the bitcode file Y. By my own convention, the wrapper for a function f() is given the name f___xxxx___(). However, I can not seam to imitate the special character at the front of __isoc99_fscanf, when I'm writing the C code. Is there a way to do it, or do I need to revise my naming convention. Regards, Ryan
On 29 May 2010 02:43, Ryan M. Lefever <lefever at illinois.edu> wrote:> I have a bitcode file Y that has a symbol __isoc99_fscanf in it. When > I disassemble the bitcode, the symbol is written as > "\01__isoc99_fscanf". I am wondering where this symbol is coming from? > I grep'ed throughout /usr on my machine for both names, and I only > found __isoc99_fscanf, without the special character in front.I'd say this is a bug in your disassembler. Even C++ mangling routines don't use non-printing chars (like \01) in function names. If you compile the bitcode directly to assembly or object file, do you still see the weird symbol? Can you send the bitcode file to the list? cheers, --renato
Hello, Ryan> "\01__isoc99_fscanf". I am wondering where this symbol is coming from?It's comming from the gcc's asm("foo") symbol renaming extension. The "\01" prefix just tells the mangler that it should not touch the symbol name at all. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hello, Renato> I'd say this is a bug in your disassembler. Even C++ mangling routines > don't use non-printing chars (like \01) in function names.No, it's ok. See my prev. e-mail to list. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Reasonably Related Threads
- [LLVMdev] "\01__isoc99_fscanf"
- [LLVMdev] [DragonEgg] Strange call to @"\01__isoc99_fscanf"
- [LLVMdev] [cfe-dev] 3.2 Release has branched :T+2 hours
- [LLVMdev] x86_stdcallcc @<n> mangling vs. '\1' prefix [was: x86_stdcallcc and extra name mangling on Windows]
- [LLVMdev] [cfe-dev] GIT mirrors