I've started a number of threads on this exact question, search the email archives if you are interested.<div><br></div><div>At this point, I have basically given up on using appending linkage for anything. Instead, the solution I've adopted is a custom linker pass that stitches globals together in the way that I need them to be. (This would be easier if I could define my own linkage type - as it stands, I have to rely on other clues as to which globals to combine together.)<br>

<div><div><div><br><div class="gmail_quote">On Thu, Dec 10, 2009 at 8:12 AM, OvermindDL1 <span dir="ltr"><<a href="mailto:overminddl1@gmail.com">overminddl1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

On Thu, Dec 10, 2009 at 2:05 AM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:<br>
> On Thu, Dec 10, 2009 at 12:26 AM, Robin Sommer <<a href="mailto:robinsommer@web.de">robinsommer@web.de</a>> wrote:<br>
>><br>
>> On Sat, Dec 05, 2009 at 22:56 -0800, I wrote:<br>
>><br>
>>> the LLVM documentation lists the 'appending' linkage for having the<br>
>>> linker combine two arrays. I'm wondering though if it's then<br>
>>> possible to get the size of the combined array, e.g., for iterating<br>
>>> over its elements? Or how would I otherwise use the combined array?<br>
>><br>
>> Any thoughts on this? Am I missing something?<br>
><br>
> Appending linkage isn't really intended for normal code; the most<br>
> common uses are for special globals, like "llvm.used" and<br>
> "llvm.global_ctors", which use compiler magic to work properly.<br>
<br>
I know there was talk at one point in the past of a certain thing you<br>
could setup that appends a zero to the end of that global array so you<br>
could iterate through it safely, did that ever come about?<br>
<div><div></div><div class="h5">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>
</div></div></div></div>