search for: lfoo

Displaying 20 results from an estimated 37 matches for "lfoo".

Did you mean: foo
2014 Dec 08
5
[LLVMdev] [lld] Handling multiple -init/-fini command line options
...nt only the last -init/-fini options. % cat foo.c int a = 0; void foo() { a += 1; } void bar() { a += 2; } % cat main.c extern int a; int printf(const char *, ...); int main() { printf("a: %d\n", a); } % gcc -fPIC -shared -o libfoo.so -Wl,-init,foo -Wl,-init,bar foo.c % gcc main.c -L. -lfoo -Wl,-rpath,. % ./a.out 2 % gcc -fPIC -shared -o libfoo.so -Wl,-init,bar -Wl,-init,foo foo.c % ./a.out 1 What is the reason of this incompatibility? The question is caused by attempt to support DT_INIT/DT_FINI dynamic table tags. The table can contain no more than one DT_INIT/DT_FINI tags. The LD...
2006 Jun 02
2
[LLVMdev] Compiling natively vsftp with LLVM
...int main() { foo(); return 0; } ---------------- foo.c --------------- #include <stdio.h. void foo() { printf("hello\n"); return; } ---------------- And the command lines: llvm-gcc -c -o main.o main.c gcc -o foo.o foo.c ar rcs libfoo.a foo.o llvm-gcc -Wl,-native main.o -L. -lfoo It's *OK* Thanks in advance for solving my problem. :) And I personally think it may possiblely puzzle other users, maybe it deserves its place in FAQ or in man page for LLVM. On Friday 02 June 2006 13:13, Chris Lattner wrote: > On Fri, 2 Jun 2006, Nai Xia wrote: > > The Makefile...
2010 Sep 16
1
[LLVMdev] Linking shared library
...which makes usage of a shared library which is included in the project. This means that I have library here: # lib/foo/*.cc and after compilation the library is placed here # Debug/lib/libfoo.so My tool is located here: # tool/test_foo # cat tool/Makefile LEVEL = ../ TOOLNAME=test_foo LIBS += -lfoo When I build the tool: # (cd tool && make) llvm[0]: Compiling test_foo.cc for Debug build llvm[0]: Linking Debug executable test_foo ... undefined reference ... collect2: ld returned 1 exit status Which means that the libfoo.so is not picked up from the Debug/lib directory. In other words...
2006 Jun 02
0
[LLVMdev] Compiling natively vsftp with LLVM
On Fri, 2 Jun 2006, Nai Xia wrote: > And the command lines: > > llvm-gcc -c -o main.o main.c > gcc -o foo.o foo.c > ar rcs libfoo.a foo.o > llvm-gcc -Wl,-native main.o -L. -lfoo > > It's *OK* > > Thanks in advance for solving my problem. :) > And I personally think it may possiblely puzzle other users, > maybe it deserves its place in FAQ or in man page for LLVM. I agree that this is an ugly issue. You've basically fallen into the "llvmgcc...
2016 Mar 21
2
Handling of section vs global name conflicts
So, we emit both a global symbol for the global variable, and a local symbol for the section, with the same name? This would need to be fixed both in the integrated assembler and in GAS. Is it even allowed? What would the symbol references bind to, when both symbols are defined? On Mon, Mar 21, 2016 at 7:55 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote: > The correct fix is
2019 Mar 27
4
RFC: ELF Autolinking
...#pragma comment(lib, "foo") will work in all cases. Otherwise we will be in a situation where you will have to have the equivalent of... #ifdef COFF_LIBRARIES: #pragma comment(linker-option, "/DEFAULTLIB:foo.lib") #'elif ELF_LIBRARIES: #pragma comment(linker-option, "-lfoo") #'elif DARWIN_FRAMEWORKS: #pragma comment(linker-option, "-framework foo") #esle #error Please specify linking model #endif ... somewhere, it would be good to avoid this. OTOH perhaps framework linking is just too different to be lumped in with #pragma comment(lib, ...) perha...
2019 Mar 19
2
RFC: ELF Autolinking
...will link on GNU style linkers but not with LLD (assuming GNU ever implemented support for autolinking). Scenario: libbar.a(bar.o) - defines symbol bar libfoo.a(foo.o) - defines foo and autolinks libbar.a main.o - references foo another.o - does not reference foo No references to bar exist lld -lfoo another.o --whole-archive main.o with autolinking becomes lld -lfoo another.o --whole-archive main.o -lbar result: bar.o gets added to the link. But, if a change is made so that another.o references bar then the link line with autolinking becomes lld -lfoo another.o -lbar --whole-archive main.o res...
2005 Feb 09
0
[LLVMdev] Interactions with threads and native code
..."dlsym," how does it > know which library to look in? Additionally, is it possible to link against > arbitrary native code libraries? LLVM works exactly like a native compiler. If you call an external function you have to link to the appropriate (possibly native) library with -lFOO options. Note that llvm-gcc takes these options which are particularly handy: llvm-gcc x.c -o a.out -Wl,-native <- produce a native a.out file with our backend llvm-gcc x.c -o a.out -Wl,-native-cbe <- produce a native a.out file with the C backend & GCC. -Chris -- http://nondo...
2019 Mar 25
3
RFC: ELF Autolinking
...>>>> libbar.a(bar.o) - defines symbol bar >>>> libfoo.a(foo.o) - defines foo and autolinks libbar.a >>>> main.o - references foo >>>> another.o - does not reference foo >>>> No references to bar exist >>>> >>>> lld -lfoo another.o --whole-archive main.o with autolinking becomes lld >>>> -lfoo another.o --whole-archive main.o -lbar result: bar.o gets added to >>>> the link. >>>> But, if a change is made so that another.o references bar then the link >>>> line with auto...
2019 Mar 21
3
RFC: ELF Autolinking
...for autolinking). >> >> Scenario: >> >> libbar.a(bar.o) - defines symbol bar >> libfoo.a(foo.o) - defines foo and autolinks libbar.a >> main.o - references foo >> another.o - does not reference foo >> No references to bar exist >> >> lld -lfoo another.o --whole-archive main.o with autolinking becomes lld >> -lfoo another.o --whole-archive main.o -lbar result: bar.o gets added to >> the link. >> But, if a change is made so that another.o references bar then the link >> line with autolinking becomes lld -lfoo anothe...
2005 Feb 09
2
[LLVMdev] Interactions with threads and native code
...adding primitives to libSystem and having some portable way to link to them from the bytecode would likely solve most of the problem. > LLVM works exactly like a native compiler. If you call an external > function you have to link to the appropriate (possibly native) library > with -lFOO options. Ah, I figured it out: lli calls dlopen on the libraries supplied by a command line parameter. The nasty compatibility hacks that are performed on Linux for libpthreads were preventing llvm-gcc from adding the correct parameter to the script file. When I manually added "-load=/lib...
2006 Jul 12
2
Error install rgl package on linux
Dear all, I tried to install rgl package on my linux machine fc5, I got an error. Here I run R as user, $ R > options(repos=c(CRAN="http://cran.at.r-project.org/")) > install.packages("rgl", lib="/home/subianto/local/lib/R/library/site-packages", dependencies=TRUE) trying URL 'http://cran.at.r-project.org/src/contrib/rgl_0.67-2.tar.gz' Content type
2005 Feb 09
2
[LLVMdev] Interactions with threads and native code
I have just begun investigating LLVM because it seems like it might be an ideal tool for building tools for playing with software. However, my current project is related to parallel programming on shared memory multiprocessor systems, so I need thread support. As far as I can tell, LLVM currently has no intrinsic support for threads, is this correct? I saw the bug that indicates that
2019 Mar 25
2
RFC: ELF Autolinking
...>>>> libbar.a(bar.o) - defines symbol bar >>>> libfoo.a(foo.o) - defines foo and autolinks libbar.a >>>> main.o - references foo >>>> another.o - does not reference foo >>>> No references to bar exist >>>> >>>> lld -lfoo another.o --whole-archive main.o with autolinking becomes lld >>>> -lfoo another.o --whole-archive main.o -lbar result: bar.o gets added to >>>> the link. >>>> But, if a change is made so that another.o references bar then the link >>>> line with auto...
2019 Mar 26
2
RFC: ELF Autolinking
...l bar >>>>>> libfoo.a(foo.o) - defines foo and autolinks libbar.a >>>>>> main.o - references foo >>>>>> another.o - does not reference foo >>>>>> No references to bar exist >>>>>> >>>>>> lld -lfoo another.o --whole-archive main.o with autolinking becomes >>>>>> lld -lfoo another.o --whole-archive main.o -lbar result: bar.o gets added >>>>>> to the link. >>>>>> But, if a change is made so that another.o references bar then the >>>...
2004 Jul 27
1
[LLVMdev] Linking to native libraries
> Yes, this is no problem. You can do something like > this: > > $ llvmgcc X.c -c -o X.bc > $ llc X.bc -o X.s > $ gcc Y.c -o Y.o -c > $ gcc X.s Y.o -o program > $ ./program Ok, fine, and what about the interpreter? It takes 100% llvm, doesn't it? Or is there some kind of import facility (perhaps as an specially interpreted call or as an extension to llvm which makes
2005 Feb 21
0
[LLVMdev] Revised patch to make gccld link native .so's
...our -L path has a libFoo.so native library that we need to link. It also contains a libBar.so bytecode library. Another directory in our -L path has a bytecode version of libFoo.so and a native version of libBar.so. What do we do? llvm-g++ -Wl,-native -shared -o libtest.so test.o -L/foobar -lfoo -L/barfoo -lbar /foobar libFoo.so --native libBar.so --bytecode /barfoo libFoo.so --bytecode libBar.so --native Now, it is possible to test for this situation, but even if we know that it is going to happen, how do we tell gcc or the system linker how to do the correct thing? ----...
2006 Jun 02
0
[LLVMdev] Compiling natively vsftp with LLVM
On Fri, 2 Jun 2006, Nai Xia wrote: > The Makefile is sth like this: > > vsftpd: $(OBJS) > gccld -r -native -o vsftpd.o $(OBJS) -L/home/xianai/my_projects/llvm/cfrontend/x86/llvm-gcc/lib/ -lcrtend > gcc -o vsftpd vsftpd.o sysdeputil.o `./vsf_findlibs.sh` > > > But the gcc/ld still cannot find the reference to __main. > Do I have to compile crtend to native to
2019 Mar 14
11
RFC: ELF Autolinking
At Sony we offer autolinking as a feature in our ELF toolchain. We would like to see full support for this feature upstream as there is anecdotal evidence that it would find use beyond Sony. In general autolinking (https://en.wikipedia.org/wiki/Auto-linking) allows developers to specify inputs to the linker in their source code. LLVM and Clang already have support for autolinking on ELF via
2006 Jun 02
2
[LLVMdev] Compiling natively vsftp with LLVM
Hi, I am using LLVM to compile vsftp to native x86 ELF code. One of it's object file (sysdeputil) contains inline asm so cannot be compiled by gcc-3.4 frontend. So I decided to firstly link together the llvm objects and libcrtend and compile it to native .o file and then link it with sysdeputil.o . The Makefile is sth like this: vsftpd: $(OBJS) gccld -r -native -o vsftpd.o $(OBJS)