search for: weak

Displaying 20 results from an estimated 2795 matches for "weak".

2011 May 12
2
Recent kmod-kvm update errors
This morning I applied the recent updates to CentOS-5.6 on a test and development host and observed this: Updating : kmod-kvm 4/20 WARNING: Can't read module /lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm.ko: No such file or directory WARNING: /lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/ksm.ko needs unknown symbol kvm_ksm_spte_count WARNING: /lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/ksm.ko needs unkn...
2006 Dec 09
1
[LLVMdev] [PATCH] print .weak directives
> I'm sorry, I must be missing something here: > > In order to have weak linkage (I'm ignoring external weak for the moment) > a global has to be defined in the LLVM code. Because it is defined in the > LLVM code, it will have to be printed out by the target asm printer > somewhere. When that happens, it will get a .weak directive emitted for > it. It...
2006 Dec 09
2
[LLVMdev] [PATCH] print .weak directives
The attached patch makes the AsmPrinter emit one .weak directive for each weak global variable that is referenced at least once in a global table. It uses a std::set to print only one directive. Thoughts? Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 29...
2006 Dec 09
0
[LLVMdev] [PATCH] print .weak directives
On Sat, 9 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patch makes the AsmPrinter emit one .weak directive for > each weak global variable that is referenced at least once in a global > table. It uses a std::set to print only one directive. I'm sorry, I must be missing something here: In order to have weak linkage (I'm ignoring external weak for the moment) a global has to be...
2020 Sep 23
4
(no subject)
Hi all, While working on alias support for the LLVM-ML project, I ran into a feature implemented back in 2010: default-null weak externals in COFF, a GNU extension. https://reviews.llvm.org/rG17990d56907b I'd like to disable this feature when targeting MSVC compatibility. Does anyone have more context on this, and why it'd be a terrible idea? For context: This seems to be designed to let LLVM implement a...
2013 Jan 09
4
[LLVMdev] [lld] ELF weak aliases
So I just got lua to link and run and work on x86-64 Linux with musl and lld. It did require one change to hack around incorrect handling of ELF weak aliases. In musl __stdio_exit.c <http://git.musl-libc.org/cgit/musl/tree/src/stdio/__stdio_exit.c> we have: static FILE *const dummy_file = 0; weak_alias(dummy_file, __stdin_used); weak_alias(dummy_file, __stdout_used); weak_alias(dummy_file, __stderr_used);...
2017 Jan 08
2
Weak symbol function in shared library and strong symbol function in main problem
DiOn Jan 8, 2017, at 10:57 AM, Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > ELF dynamic loaders generally do not distinguish between weak and strong symbols. They only look at the visibility, which can be internal, hidden, default, or protected. Was it always the case? The only thing I find in the doc is the description of the environment variable: LD_DYNAMIC_WEAK "(glibc since 2.1.91) Allow weak symbols to be overridden (reve...
2006 Dec 07
2
[LLVMdev] [patch] print ".weak" directive
The attached patch makes the ASM printer print the ".weak" directive when a weak symbol is added to a constant pool. I need something similar to it in order to bootstrap gcc on ARM. Any comments? Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 1816 byt...
2006 Dec 18
2
[LLVMdev] [patch] emit .weak for zero initialized weak variables
> I'm not sure this is right. C code like this: > > int X; > > should compile to a .comm directive, not a .weak directive, right? right. According to GCC, "int x" should compile to ".comm x", but "int x __attribute__((weak))" should compile to --------------- .weak x x: .zero 4 --------------- It looks like we have a bug in llvm-gcc, both C codes compile to ---...
2012 Nov 02
4
[LLVMdev] linker warnings in Linking CXX executable Debug/AsanTest
Nick, Have you noticed that llvm/clang svn produces the following linker warnings on 'make check-all'? Linking CXX executable Debug/AsanTest ld: warning: direct access in llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to global weak symbol vtable for llvm::convertible_fwd_ostream means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. ld: warning: direct access in llvm::convertible_fwd_ostream::~convertible_fwd_ostream() to...
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...
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...
2013 Jan 09
0
[LLVMdev] [lld] ELF weak aliases
How are you modeling weak aliases in Atoms? mach-o does not support weak aliases. My mental model of a weak alias is: If foo is a weak alias for bar, then if nothing else defines bar, use foo in place of bar. -Nick On Jan 8, 2013, at 4:50 PM, Michael Spencer wrote: > So I just got lua to link and run and work on...
2006 Dec 06
2
[LLVMdev] weak linkage
I am implementing weak linkage support on the ARM backend and I noticed this code on the X86 and PPC backends: ------------------------------------------------ // If the initializer is a extern weak symbol, remember to emit the weak // reference! if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))...
2006 Dec 08
0
[LLVMdev] [patch] print ".weak" directive
On Thu, 7 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patch makes the ASM printer print the ".weak" directive > when a weak symbol is added to a constant pool. > > I need something similar to it in order to bootstrap gcc on ARM. --- lib/CodeGen/AsmPrinter.cpp 7 Dec 2006 01:30:31 -0000 1.120 +++ lib/CodeGen/AsmPrinter.cpp 7 Dec 2006 13:00:17 -0000 @@ -640,6...
2017 Jan 08
3
Weak symbol function in shared library and strong symbol function in main problem
Hi, I have a pass that add a function in the module where the “main” is. Then, I have the same function declared as weak symbol in a shared library that I load at runtime with LD_PRELOAD. When I run a program the weak symbol function gets called over the function was added by the pass. Is it a correct behavior? Is there a way to call the strong symbol function when it’s present in the module? In other words, when I...
2017 Jan 14
4
Weak symbol/alias semantics
...t;peter at pcc.me.uk> wrote: > Hi Teresa, > > I think that to answer your question correctly it is helpful to consider > what is going on at the object file level. For your test1.c we conceptually > have a .text section containing the body of f, and then three symbols: > > .weak f > f = .text > .globl strongalias > strongalias = .text > .weak weakalias > weakalias = .text > > Note that f, strongalias and weakalias are not related at all, except that > they happen to point to the same place. If f is overridden by a symbol in > another object file,...
2014 Feb 10
2
[LLVMdev] Fwd: [windows) how to use weak references with llvm 3.4 and windows?
Hello, I'm generating C code (and the resulting obj files) using llvm 3.4 for both unix and windows. And I use the dreaded weak references, that, for windows, are not too widely supported. When I link my application on linux, I have no issue. But when I'm doing the same on windows using mingw I got a duplicate symbol error : ..\robovm-0.0.8\lib\robovm-rt.jar\dalvik\system\BlockGuard$BlockGuardPolicyException.class.o:(...
2006 Dec 09
2
[LLVMdev] [patch] emit .weak for zero initialized weak variables
The attached patches makes all backends print a .weak directive for zero initialized variables. GCC does it on x86-64 and ARM. I assume that it should be done on all architectures. The patch also adds a test to the ARM backend? Should I copy it to all backends? Comments? Thanks, Rafael P.S.: I find the doFinalization code a bit confusing. Would yo...
2017 Oct 14
2
Weak undefined symbols and dynamic libraries
lld as well as other linkers work hard to make weak undefined symbols work beyond ELF binaries when dynamic linking involved, but unless everything is compiled with -fPIC, they don't actually work as people would expect. I think most people do not know that fact, and even for those who have knowledge on ELF, the current half-broken behavior is...