search for: linkag

Displaying 20 results from an estimated 1885 matches for "linkag".

Did you mean: linkage
2010 Jun 30
2
[LLVMdev] RFC: New Linkage Type linker_private_weak
This patch introduces a the new "linker_private_weak" linkage type. Why a new linkage type? The idea behind the "linker" linkage types is that they are used by the linker and then discarded. I.e., the symbols won't show up in the final linked image. In that regard, all "linker" linkage types are inherently "private". The &q...
2015 Jul 14
3
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
As mentioned in the Updated ThinLTO RFC ( http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-May/086211.html), I am sending the symbol linkage and renaming required by ThinLTO as a separate RFC. It is included below. I've also attached the doc in pdf form, since the formatting (especially for the table at the end) may not come through in the copied text below well. Thanks! Teresa ThinLTO Symbol Linkage and Renaming 1 Introducti...
2010 Jul 01
0
[LLVMdev] RFC: New Linkage Type linker_private_weak
On Jun 30, 2010, at 1:36 PM, Bill Wendling wrote: > This patch introduces a the new "linker_private_weak" linkage type. > > Why a new linkage type? The idea behind the "linker" linkage types is that they are used by the linker and then discarded. I.e., the symbols won't show up in the final linked image. In that regard, all "linker" linkage types are inherently "private&quo...
2003 Nov 21
1
[LLVMdev] Linkage Types
Okay, I'm past the GEP "have to dereference pointer first" problem of my last post. I now have a linkage error (I get undefined symbol when I try to assemble the program). gcc -o test.o test.s says: > /tmp/cczhiFk7.o(.text+0x7): In function `a': > : undefined reference to `_index_' _index_ is defined like this: > %_index_ = external global long ; <long*> [#uses=12]...
2014 Mar 08
6
[LLVMdev] [RFC] Linkage of user-supplied library functions in LTO
+nick and rafael, who seem to a lot about linkage. I made the following claim on llmv-commits [1]: On 2014 Mar 3, at 15:01, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > Giving these functions internal linkage allows them to be dead-stripped. Is that even correct? This is the assumption I’ve been working under, but I’m...
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 conclusio...
2015 Jul 21
1
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...< dexonsmith at apple.com> wrote: > > > On 2015-Jul-14, at 13:33, Teresa Johnson <tejohnson at google.com> wrote: > > > > As mentioned in the Updated ThinLTO RFC ( > http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-May/086211.html), I am > sending the symbol linkage and renaming required by ThinLTO as a separate > RFC. It is included below. I've also attached the doc in pdf form, since > the formatting (especially for the table at the end) may not come through > in the copied text below well. > > > > Thanks! > > Teresa > >...
2016 Apr 14
4
[ThinLTO] RFC: ThinLTO distributed backend interface
...e to be made a single time in the thin link step, summary based decisions need to be serialized out in order to be used by the FunctionImporter in each backend process (which could be invoked directly from clang, or via a possibly modified FunctionImportPass interface). My original plan was to mark linkage changes determined globally (such as promotion decisions) in the combined index itself for consumption in each back end. But an advantage of serializing out just the necessary info for each module is that the entire combined index wouldn’t need to be staged to each distributed build node. Individ...
2016 Mar 11
2
RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
...support that. Deciding whether a symbol is dynamically replaceable should not be a target- and option-specific decision in LLVM IR. It seems obvious to me that the right default rule is that symbols cannot be replaced. We already have several ways to express replaceability in IR, but they’re all linkage kinds, not visibility kinds; and in fact, there are some basic APIs in LLVM that assume that this decision is wholly a matter of the linkage kind. So it seems reasonable to me to eliminate protected visibility, and then make sure we can still express everything we need to using linkage, adding ne...
2017 Oct 25
2
linkonce expected behavior?
http://llvm.org/docs/LangRef.html#linkage-types says: Globals with “linkonce” linkage are merged with other globals of the same name when linkage occurs. This can be used to implement some forms of inline functions, templates, or other code which must be generated in each translation unit that uses it, but where the body may be overridde...
2017 Oct 25
2
linkonce expected behavior?
...g direct object in the sentence. Referenced by a function local to the module? Referenced by any object in the linker job? > > vedant > > On Oct 24, 2017, at 6:09 PM, Andrew Kelley via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > http://llvm.org/docs/LangRef.html#linkage-types says: > > Globals with “linkonce” linkage are merged with other globals of the same > name when linkage occurs. This can be used to implement some forms of > inline functions, templates, or other code which must be generated in each > translation unit that uses it, but where t...
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 shou...
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 %Module*]* getelementptr ([1 x %Module*]* bitca...
2016 May 13
2
[RFC] Fail early on unimplementable append linkage uses
On 13 May 2016 at 08:51, Renato Golin <renato.golin at linaro.org> wrote: > On 13 May 2016 at 13:43, Rafael Espíndola <llvm-dev at lists.llvm.org> wrote: >> That means that appending linkage can only be used with llvm special >> symbols that never hit a real .o. > > So they should have been resolved by emission time, or it's a back-end error. Not resolved, translated. For example, llvm.ctors gets expanded to whatever form the object file uses for processing static con...
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 its elements? Or how would I otherwise use the combined array? > > Any thoughts on this? Am I missing someth...
2013 Mar 26
6
[LLVMdev] Feedback required on proper dllexport/import implementation
Hello, while improving and extending support for dllexport/import I have noticed that the current way these are implemented is problematic and I would like some input on how to proceed. Currently dllexport/dllimport is treated as linkage type. This conflicts with inlined functions because there is no linkage for the combination of both. On first though, combining both doesn't make sense, but take this class as an example: struct __declspec(dllexport/dllimport) X { X() {} }; Such constructs with empty or simple inline...
2017 Jun 02
10
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
...-unknown-linux-gnu" @X = constant i32 42, section "foo", align 4 @a = weak alias i32, i32* @X define void @afun() { %1 = load i32, i32* @a ret void } define void @testtest() { tail call void @boop() ret void } declare void @boop() ; Module summary: ; testtest (External linkage) ; Function (2 instructions) ; Calls: boop ; X (External linkage) ; Global Variable ; afun (External linkage) ; Function (2 instructions) ; Refs: ; a ; a (Weak any linkage) ; Alias (aliasee X) I've implemented the above format in the llvm-dis utility, since there cur...
2016 Nov 19
4
GlobalValue::AvailableExternallyLinkage
...pass only on the new copy of the functions, i.e. only the “_parallel” functions will be instrumented by tsan. In some programs that I am compiling, the functions such as atoi and atof get cloned but I want to avoid this, and I noticed that only those functions have GlobalValue::AvailableExternallyLinkage, so I was wondering if checking the linkage is enough to avoid those library functions or there could be situations of functions with that linkage but that have the body implemented in the same module. Does it make sense now? Thanks. Simone > On Nov 19, 2016, at 13:32, Mehdi Amini <mehdi...
2020 Feb 18
4
LLD doesn't handle globals with appending linkage
...osting 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 plugged into LTO pipeline, which turns this global into internal one in the final module. I was hoping that LLD would first link bitcodes like llvm-link, appending @myvar's from both modules into a single one, then run...
2015 Jul 24
3
[LLVMdev] LLVM linkage flags
An enumeration for the kinds of linkage for global values. Hi, I'm currently writing a compiler that takes llvm-ir input. I'm a little confused by the following linkage flags: Enumerator: > > ExternalLinkage: Externally visible function > > AvailableExternallyLinkage: Available for inspection, not emission. > &g...