Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Getting The Resulting Size of Appending Linkage Array?"
2010 Apr 11
1
[LLVMdev] llvm.global_ctors and other "appending linkage" global variables?
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
2009 Dec 03
1
[LLVMdev] Appending linkage and DGE
Sorry if this question is a repeat, I never got an answer the last time I
asked :)
How does appending linkage interact with dead global elimination? From what
I understand, appending linkage arrays are stitched together by the linker.
Dead global elimination usually happens after linking, so if any of those
arrays are "live", then any globals that they point to will be live as well.
My
2008 Apr 02
0
[LLVMdev] Question about appending linkage
Talin wrote:
> I'm trying to figure out how to do static initialization (like static
> constructors in C++ or Java). I figured I would use appending linkage -
> that is, for each module I'd generate a function that did all of the
> static initialization for that module, and then I'd put a pointer to
> that function in an array with appending linkage. Then my
>
2008 Apr 02
3
[LLVMdev] Question about appending linkage
I'm trying to figure out how to do static initialization (like static
constructors in C++ or Java). I figured I would use appending linkage -
that is, for each module I'd generate a function that did all of the
static initialization for that module, and then I'd put a pointer to
that function in an array with appending linkage. Then my
compiler-generated startup code would simply
2008 Apr 24
1
[LLVMdev] Question about appending linkage
My apologies for opening up an old thread, but I've been thinking about
this quite a bit lately, and it seems to me that "appending linkage"
would be a lot more useful in general if there was some way to determine
the size of the appended array without having to write a custom pass to
do it. In other words, using the standard llvm tools (llvm-link and
friends), one ought to be
2009 Sep 28
1
[LLVMdev] Appending linkage
This is an issue I raised a while ago, but I wanted to know if the situation
had improved at all recently.
The issue is determining the number of elements in an array that has
appending linkage.
The obvious course would be to use a constant GEP. Suppose we have N
modules, each containing a global variable with appending linkage whose
initializer is an array of size M containing elements of type
2009 Dec 10
2
[LLVMdev] Appending linkage
On Thu, Dec 10, 2009 at 12:26 AM, Robin Sommer <robinsommer at web.de> wrote:
>
> On Sat, Dec 05, 2009 at 22:56 -0800, I wrote:
>
>> the LLVM documentation lists the 'appending' linkage for having the
>> linker combine two arrays. I'm wondering though if it's then
>> possible to get the size of the combined array, e.g., for iterating
>> over
2009 Dec 10
0
[LLVMdev] Appending linkage
On Thu, Dec 10, 2009 at 2:05 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Dec 10, 2009 at 12:26 AM, Robin Sommer <robinsommer at web.de> wrote:
>>
>> On Sat, Dec 05, 2009 at 22:56 -0800, I wrote:
>>
>>> the LLVM documentation lists the 'appending' linkage for having the
>>> linker combine two arrays. I'm wondering
2008 Apr 02
1
[LLVMdev] Question about appending linkage
John Criswell wrote:
> Talin wrote:
>
>> I'm trying to figure out how to do static initialization (like static
>> constructors in C++ or Java). I figured I would use appending linkage -
>> that is, for each module I'd generate a function that did all of the
>> static initialization for that module, and then I'd put a pointer to
>> that function in
2020 Feb 18
2
LLD doesn't handle globals with appending linkage
On Tue, Feb 18, 2020 at 9:42 PM David Blaikie <dblaikie at gmail.com> wrote:
> I'm /guessing/ this might be related to the COFF support specifically
> (perhaps COFF has no appending linkage support - in some cases LLVM IR
> supports the union of all semantics so that different formats can be fully
> expressed - but it means when targeting certain formats, some features are
2009 Dec 06
2
[LLVMdev] Appending linkage
Hi all,
the LLVM documentation lists the 'appending' linkage for having the
linker combine two arrays. I'm wondering though if it's then
possible to get the size of the combined array, e.g., for iterating
over its elements? Or how would I otherwise use the combined array?
Thanks,
Robin
--
Robin Sommer * Phone +1 (510) 666-2886 * robin at icir.org
ICSI/LBNL * Fax +1
2020 Feb 18
4
LLD doesn't handle globals with appending linkage
Hello.
I'm posting this question here, because there seem to be no LLD-specific
mailing list. Sorry in advance if this is wrong one.
I compile two C source with following command:
clang -flto -o %name.bc %name.c
LLVM is augmented with my custom pass, which amongst other things create a
global with appending linkage:
@myvar = appending constant [1 x [1 x i8]*] ...
I also have another pass
2003 Nov 23
0
[LLVMdev] Linkage Types again!
> That's essentially what I did to get it to work but instead of
> appending, I just opted for LinkOnce.
Sounds ok.
> > I don't quite understand why you need an appending global to do this, if you
> > can only have one main. I would just set it to the correct initializer in the
> > module that has main, and leave it external everywhere else.
>
> Its
2009 Dec 10
0
[LLVMdev] Appending linkage
On Sat, Dec 05, 2009 at 22:56 -0800, I wrote:
> the LLVM documentation lists the 'appending' linkage for having the
> linker combine two arrays. I'm wondering though if it's then
> possible to get the size of the combined array, e.g., for iterating
> over its elements? Or how would I otherwise use the combined array?
Any thoughts on this? Am I missing something?
2016 May 13
4
[RFC] Fail early on unimplementable append linkage uses
Append linkage is magical. It doesn't correspond to anything available
in real object files (ELF/COFF/MachO). In those files sections are
appended, but symbols are just resolved.
That means that appending linkage can only be used with llvm special
symbols that never hit a real .o.
Long term I think we should delete it an replace with explicit use of section.
But for now I would like to just
2003 Nov 18
0
[LLVMdev] Packages
On Mon, 17 Nov 2003, Reid Spencer wrote:
> On Mon, 2003-11-17 at 22:44, Chris Lattner wrote:
>
> > We already have never, ever, delete this flags. "weak" and external
> > linkage both guarantee that. If there can be an external caller of some
> > function, for example, the optimizer CANNOT delete it, nor can it change
> > it's interface.
>
>
2006 Feb 27
2
[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
Robert,
Thanks for the info, you've confirmed what I was trying to do, but when
I compile:
-----------------------
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("yo\n");
return 0;
}
-----------------------
without "-c" (llvm-gcc t1.c -o t1) the dissassembled bytecode does not
call __main:
-----------------------
; ModuleID =
2003 Nov 23
3
[LLVMdev] Linkage Types again!
The problem I'm experiencing with Stacker has to do with linkage types
(again!).
What I'm trying to do is create a "global appending" array. In
compilation units that don't include "main", I generate it with:
TheStack = new GlobalVariable(
/*type=*/ stack_type,
/*isConstant=*/ false,
/*Linkage=*/
2009 Oct 06
0
[LLVMdev] More questions about appending linkage
So, I was in the process of writing a custom LLVM pass (my first one, yay!)
to handle the problem of measuring the length of an appending linkage array.
The approach I was taking was pretty simple: Iterate through all of the
module's global variables until I find one that is trying to calculate the
end of an appending-linkage array, which looks like this:
@_moduleListEnd = constant [1 x
2016 May 24
2
Undefined symbols in llvm-objdump linkage on x86_64-apple-darwin15
On Tue, May 24, 2016 at 2:28 PM, Chris Bieneman <beanz at apple.com> wrote:
> Jack,
>
> What version of CMake are you using?
>
> -Chris
Chris,
I am using cmake 3.5.2. My read of this problem is as follows.
While libLLVM.dylib is being linked against -lxar when
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON is passed to cmake, the libLLVM.dylib
is created with -Wl,-dead_strip such that