<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18904"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial><SPAN class=067200317-11042010>Can anyone explain
how llc translates "appending linkage" global variables like llvm.global_ctors
into assembly? In the case I am examining,
the global_ctor variables are in multiple bitcode object modules
produced by the llvm compiler as arrays of pointers. As documented, the arrays
seem to be combined when the different bitcode object modules are linked
into one, so now there is one llvm.global_ctors array. But then when llc
compiles the bitcode file into an assembly file, the llvm.global_ctor variable,
or at least its symbol, disappears.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=067200317-11042010>In this case, the
array looks like it is an array of pointers to functions. The functions whose
addresses were in the global_ctors array are still present in the assembly file,
but the global_ctors array itself seems to be gone. Or perhaps it is translated
to another data structure that I do not recognize in the assembly file. I
have found a couple of other "appending linkage" variables that are also
not present as a symbol in the assembly file. They all seem to be special cases,
I think.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=067200317-11042010>Does llc always
remove "appending linkage" global variable symbols when translating
to assembly language? If not, can anyone explain when these
variables are added to the assembly language file and when they are
not?</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010>thanks,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010>-David</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=067200317-11042010></SPAN></FONT> </DIV></BODY></HTML>