[LLVMdev] global symbols converted to local symbols

Ryan M. Lefever lefever at crhc.uiuc.edu
Wed Oct 29 19:42:08 PDT 2008


As a follow up, if I first convert x.bc to a c file using llc -march=c 
-o x.c x.bc, and then I use normal gcc to convert x.c to an executable, 
f() remains a global symbol.  Is llvm-nm incorrectly converting the 
global symbols to local symbols?

Ryan M. Lefever wrote:
> I have a bitcode file x.bc.  When I run llmv-nm on x.bc, it shows that a 
> function f(), that I've written, is defined as a global function (text) 
> object, i.e., llvm-nm shows it marked with a 'T'.  I have converted x.bc 
> to an executable with the following command:  llvm-ld -native -o x.exe 
> x.bc  When I run nm on x.exe, it shows that f is now a local function 
> (text) object, i.e., nm shows it marked with a 't'.  Why is llvm-ld 
> converting f() from a global function object to a local function object.
> 
> I believe that I need f() to be a global function object because I use 
> LD_PRELOAD to load a library that make use of f().
> 
> Thanks,
> Ryan
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-- 
Ryan M. Lefever  [http://www.crhc.uiuc.edu/~lefever/index.html]



More information about the llvm-dev mailing list