[LLVMdev] dragon egg adding extra characters to function names

Gregory Malecha gmalecha at eecs.harvard.edu
Mon Jul 25 12:49:15 PDT 2011


I'm looking at compiling some pieces of the standard library with llvm but
I'm running into problems with some functions being renamed by dragonegg.
For example, when I compile the acos implementation with plain gcc I get:

$ nm acos.o
0000000000000000 r .LC1
0000000000000048 r .LC10
0000000000000050 r .LC11
0000000000000058 r .LC12
0000000000000060 r .LC13
0000000000000068 r .LC14
0000000000000070 r .LC15
0000000000000008 r .LC2
0000000000000010 r .LC3
0000000000000018 r .LC4
0000000000000020 r .LC5
0000000000000028 r .LC6
0000000000000030 r .LC7
0000000000000038 r .LC8
0000000000000040 r .LC9
0000000000000000 T __GI_acos
0000000000000000 T __ieee754_acos
                 U __ieee754_sqrt
0000000000000000 T acos

but when I compile with dragonegg, I get:

$ llvm-nm acos.bc.o
         T __GI_acos
         T acos
         T __ieee754_acos
         U __ieee754_sqrt

Why does LLVM do this? I assume that it has something to do with the fact
that LLVM treats the function "acos" as special and so doesn't want it to be
redefined, is that correct? I've been running a post-processing pass that
finds functions and function references with the character and removes it,
but this kind of messes up my workflow. Is there anyway to tell LLVM to not
do this?

gregory malecha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110725/ff7f73ad/attachment.html>

More information about the llvm-dev mailing list