search for: extern_weak

Displaying 17 results from an estimated 17 matches for "extern_weak".

2016 Oct 07
2
Is extern_weak a legal linkage for function definitions?
Hi, The LLVM language reference doesn't say that extern_weak is illegal for function definitions, but it seems this restriction is enforced in the code in some places: https://github.com/llvm-mirror/llvm/blob/master/lib/AsmParser/LLParser.cpp#L4591 https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#L327 However it is pos...
2017 Mar 14
3
[lld] elf linker creates undefined empty symbol
...t gmail.com> writes: >> >> When __libc_start_main is hidden, it doesn't end up in the dynamic >> symbol >> >> table and so we use the default DynsymIndex of 0. >> >> >> > >> > >> > I think BFD is doing the right thing. The `extern_weak hidden` is >> resolved >> > to null since by virtue of being hidden it doesn't refer to the >> function in >> > libc.so (and there is no definition in the executable). For some reason, >> > LLD thinks that it needs to resolve __libc_start_main dynamically...
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
Sean Silva <chisophugis at gmail.com> writes: >> When __libc_start_main is hidden, it doesn't end up in the dynamic symbol >> table and so we use the default DynsymIndex of 0. >> > > > I think BFD is doing the right thing. The `extern_weak hidden` is resolved > to null since by virtue of being hidden it doesn't refer to the function in > libc.so (and there is no definition in the executable). For some reason, > LLD thinks that it needs to resolve __libc_start_main dynamically and > things go horribly wrong. Rafael, wh...
2014 Feb 12
2
[LLVMdev] Fwd: [windows) how to use weak references with llvm 3.4 and windows?
So instead of using linkagetypes.weak I should use externalweaklinkage ? Le 11 févr. 2014 18:29, "Reid Kleckner" <rnk at google.com> a écrit : > You'd have to use extern_weak linkage. Clang compiles the foo declaration > to: > $ clang -cc1 -emit-llvm -o - t.c | grep declare.*@foo > declare extern_weak i32 @foo(...) #1 > > > > On Tue, Feb 11, 2014 at 4:16 AM, Carl <name.is.carl at gmail.com> wrote: > >> Thanks for your clear answer. D...
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
...d linked one fails to load. >> >> >> Carlo seems to be passing --lto-O0 so bugpoint might be a viable >> alternative as well if the input is bitcode. >> >> -- Sean Silva >> > > > Should anyone ever get this, Sean Silva found this: > > declare extern_weak hidden void @__libc_start_main(i32 (i32, i8**, i8**)*, > i32, i16**, i32 (i32, i8**, i8**)*, void ()*) > > triggered a rogue relocation to (0). Making it non hidden fixes this. > > Rafael, weird thing is, gnu ld is perfectly fine with this, so not sure if > this is a bug. > &gt...
2015 Aug 28
7
Clearing the BSS section
Hi, I am writing a function that clears the BSS section on an Cortex-M4 embedded system. The LLVM (version 3.7.0rc3) code I had wrote is : ;------------ target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7em-none--eabi" @__bss_start = external global i32 @__bss_end = external global i32 define void @clearBSS () nounwind { entry:
2014 Feb 11
2
[LLVMdev] Fwd: [windows) how to use weak references with llvm 3.4 and windows?
Thanks for your clear answer. Do you know what modifier should I use to declare such weak symbols in my llvm intermediate code? So that it can be compiled to the .o file with the weak attribute ? Le 10 févr. 2014 19:44, "Reid Kleckner" <rnk at google.com> a écrit : > COFF doesn't support the same kind of concept of 'weak' that ELF does. > This is the issue that
2006 Nov 08
0
[LLVMdev] 1.9 Next Steps
...it: --- lib/AsmParser/llvmAsmParser.y.orig Wed Nov 8 16:53:24 2006 +++ lib/AsmParser/llvmAsmParser.y Wed Nov 8 16:53:34 2006 @@ -2102,8 +2102,8 @@ }; FnDeclareLinkage: /*default*/ | - DLLIMPORT { CurFun.Linkage = GlobalValue::DLLImportLinkage } | - EXTERN_WEAK { CurFun.Linkage = GlobalValue::DLLImportLinkage }; + DLLIMPORT { CurFun.Linkage = GlobalValue::DLLImportLinkage; } | + EXTERN_WEAK { CurFun.Linkage = GlobalValue::DLLImportLinkage; }; FunctionProto : DECLARE { CurFun.isDeclare = true; } FnDeclareLinkage Fun...
2015 Oct 28
3
DragonEgg for gcc-5 and llvm-3.6
...mple of ExternVariableWeakref.c below: The test file looks like: // RUN: %dragonegg -S %s -o - | FileCheck %s static int variable_weakref __attribute__ ((weakref("bar"))); int *use_variable = &variable_weakref; // CHECK: @use_variable = unnamed_addr global i32* @bar // CHECK: @bar = extern_weak global i32 And the output we get (which ideally should match the CHECK sections above) is: @use_variable = unnamed_addr global i32* @variable_weakref @variable_weakref = internal global i32 0 Note that for some reason, it is not creating a weak symbol. We'd appreciate any suggestions on how...
2011 Mar 16
0
[LLVMdev] linkage type
There is a description of all the possible linkage types at http://llvm.org/docs/LangRef.html#linkage – does this answer your question? (Basically, an extern_weak resp. ExternalWeakLinkage symbol becomes null instead of being an undefined reference) David On 3/16/11 7:06 PM, Junjie Gu wrote: > What is the difference between WeakAnyLinkage and ExternalWeakLinkage > ? They are defined in GlobalValue.h. Thanks > > Junjie > _________________...
2011 Mar 16
2
[LLVMdev] linkage type
What is the difference between WeakAnyLinkage and ExternalWeakLinkage ? They are defined in GlobalValue.h. Thanks Junjie
2007 Oct 16
1
[LLVMdev] one remaining CellSPU backend bug...
...; <i1> [#uses=1] br i1 %tmp7, label %UnifiedReturnBlock, label %bb10 bb10: ; preds = %bb tail call void %tmp5( i8* bitcast ([0 x i8*]* @__JCR_LIST__ to i8*) ) ret void UnifiedReturnBlock: ; preds = %bb, %entry ret void } declare extern_weak void @_Jv_RegisterClasses(i8*) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071015/d235e7ec/attachment.html>
2008 Nov 07
2
[LLVMdev] CBE errors
...ned char )(bool )(((unsigned int )(bool ) (_ZL22__gthrw_pthread_cancelm != ((unsigned int (*) (unsigned long long ))/*NULL*/0))) != 0u)) != ((unsigned char )0))) { Here are the relevant lines from the LLVM bitcode. The bitcode appears correct since "pthread_cancel" is declared as extern_weak and the alias "_ZL22__gthrw_pthread_cancelm" is declared as a weak alias of "pthread_cancel". I'm just a bit confused about "pthread_cancel" -- shouldn't it be declared as a regular external symbol? $ llvm-dis main.bc $ grep -Hn pthread_cancel main.ll m...
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
On Tue, Feb 21, 2017 at 2:05 PM, Rafael Avila de Espindola via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Carlo Kok <ck at remobjects.com> writes: > > > On 2017-02-21 20:33, Rafael Avila de Espindola wrote: > >>> Input files: > >>> https://www.dropbox.com/s/8yn3dggx05atn47/binLinux.zip?dl=0 > >> > >> If you pass --reproduce
2018 Apr 04
0
weird behaviour of llvm::linker::LinkInModule()
...to be copied, together with complex types its using:</div><div>    ; ModuleID = 'JitModule'</div><div>    source_filename = "JitModule"   </div><div>    %struct._EN12RecordStreamE = type { %class.RecordStream }</div><div>    declare extern_weak void @_EN12RecordStream4InitEPTsN18_EN12RecordStreamEEPvv(%struct._EN12RecordStreamE*, i8*)</div><div>   </div><div>    ... But later I'm not able to link in ModuleB to ModuleA using linker.linkInModule(std::move(ModuleB));</div><div>    llvm says: Assertion...
2006 Dec 26
1
[LLVMdev] [patch] emit .weak for zero initialized weak variables
> Is there a semantic difference between the two? Just because GCC compiles > them to different things, it doesn't mean they do different things... Sorry for the long delay... On a x86 box I am able to use both declarations interchangeably. There is a problem if we have both a declaration and an use on the same file: We must print a ".weak" because of the use, but if we
2006 Nov 08
6
[LLVMdev] 1.9 Next Steps
I created the 1.9 release branch last night. As a reminder, please do not check in any code changes to the release branch. Please send me email if you have changes that need to be merged into the release branch. To check out the release branch: cvs -d <CVS Repository> co -r release_19 llvm cvs -d <CVS Repository> co -r release_19 llvm-test cvs -d <CVS Repository> co -r