dynamic-linking Questions

2

Solved

I have a question about the C++ visibility attribute. I have read http://gcc.gnu.org/wiki/Visibility and yet I dont quite understand how it works. I want use the visibility to be hidden on some of...
Scop asked 25/8, 2010 at 21:28

1

Solved

I cannot seem to get this to work. I configured with the --with-gcc-toolchain= where after the equals I put the directory where gcc was (/usr/lib/gcc-snapshot/bin). I also looked into the answers ...
Discussion asked 2/1, 2013 at 7:14

3

Solved

I would like to include libQtGui.so.4 libQtNetwork.so.4 and libQtCore.so.4 in the same directory as where my app resides. How would I make Qt understand this? y purpose is to have a standalone app ...
Stevenage asked 23/3, 2010 at 2:28

1

Solved

I have an app, call it Animal.app. Inside its Contents/Frameworks folder is a framework, say Mammal.framework. And inside the Versions/A/Frameworks folder of the framework, I have dog.dylib. The in...
Jukebox asked 23/10, 2012 at 1:11

3

Solved

I came across a piece of code which uses #pragma comment(lib, "libraryname"). Why this type of usage as opposed to just linking the library from the properties menu? In what situations is this usa...
Castrato asked 10/10, 2012 at 14:8

1

Solved

What is the difference between .got and .got.plt section in ELF format?
Spiegeleisen asked 26/7, 2012 at 19:15

2

Solved

0x00000000004004b6 <main+30>: callq 0x400398 <printf@plt> Anyone knows? UPDATE Why two disas printf give me different result? (gdb) disas printf Dump of assembler code for function...
Chignon asked 29/3, 2011 at 7:34

2

Solved

I have a few small components that I am building as shared libraries for my main application. Lets use an example of liba and libb. Each is built within their own subdirectory as follows: add_libr...
Albaugh asked 30/8, 2012 at 20:18

5

Solved

I've been trying to make some applications which all rely on the same library, and dynamic libraries were my first thought: So I began writing the "Library": /* ThinFS.h */ class FileSystem { pub...
Grubbs asked 4/1, 2010 at 18:10

1

Solved

In my C++ application I have a static library (libCOMMON.a) that links to boost libraries: system, filsystem, timer and chrono. I am using CMake and here is how I create and link libCOMMON.a: ADD...
Cartan asked 3/5, 2012 at 13:59

2

I have been cross-compiling some Linux tools (and some of my own C code) to Android and one of the challenges that I face is that Android's libc has some missing/stripped components and I end up pa...
Bridgettebridgewater asked 30/4, 2012 at 8:11

1

Solved

I have a library that I got from a proprietary source and I'm trying to link against it but I'm getting the following error libxxx.so: file not recognized: File format not recognized collect2: ld ...
Trigraph asked 30/3, 2012 at 8:27

1

Solved

I have an application I'm building that's using the NetCDF C++ library, and NetCDF is pulling in the HDF-4 libary. However, it's pulling in the wrong HDF-4 library. Here's how my app is linked: /...
Lilalilac asked 2/3, 2012 at 19:57

2

Solved

(This is gcc 3.3.1 (long story -- blame NIST) on Cygwin.) I have compiled some source files with gcc -c -fPIC ... to get .o files. Then I did: $ gcc -shared -o foo.dll foo.o bar.o But when I g...
Cheap asked 16/2, 2012 at 19:30

6

Solved

I saw and done myself a lot of small products where a same piece of software is separated into one executable and several DLLs, and those DLLs are not just shared libraries done by somebody else, b...
Rhombus asked 4/6, 2010 at 9:50

1

The combination of set-uid and a relative path in the INTERP section of an ELF binary is very dangerous. I'm not quite sure how and where this problem should be reported, but it seems to me like ...
Overwhelming asked 26/1, 2012 at 13:50

3

I am looking for a nice way of enumerating all ELF sections and their addresses of the current binary and all shared objects the current process might have loaded. I know about the existance of dl...
Gowk asked 1/2, 2012 at 23:1

2

Solved

So, I'm building a project, and it uses functions from a compiled library (.dylib or .so). I have the headers and the library files (this is all part of QtRoot, btw) in appropriate locations, but w...
Molar asked 12/8, 2010 at 1:38

3

Solved

Suppose I have an ELF binary that's dynamic linked, and I want to override/redirect certain library calls. I know I can do this with LD_PRELOAD, but I want a solution that's permanent in the binary...
Satiety asked 27/10, 2010 at 4:19

1

Solved

I am wondering what load-time relocation actually means on a system with virtual memory support.I was thinking that in a system with virtual memory every executable will have addresses starting fro...
Frecklefaced asked 25/8, 2011 at 16:24

5

Solved

I'm trying to build a Python extension on MacOSX 10.6 and to link it against several frameworks (i386 only). I made a setup.py file, using distutils and the Extension object. I order to link again...
Falito asked 6/4, 2010 at 12:1

2

I've noticed a failing with apps depending on shared libraries: that if you're missing some dependency, the app will fail at load time even if the user has no intention of using the dependency's fu...
Dionisio asked 22/12, 2011 at 21:46

1

Why doesn't cabal install use the flag --enable-shared by default? I've notice that trivial programs when compiled without this flag, get huge in file size. Is there a connection? Is this a design ...

1

Solved

I'm trying to interpose malloc/free/calloc/realloc etc with some interposers via LD_PRELOAD. In my small test, only malloc seems to be interposed, even though free is detected (see output). I'd ex...
Joslin asked 18/10, 2011 at 18:2

3

I'd like to get function's address by name. For example, currently I am using dlsym: unsigned long get_func_addr(const char *func_name) { return (unsigned long)dlsym(NULL, func_name); } Howeve...
Nutty asked 8/9, 2011 at 17:25

© 2022 - 2024 — McMap. All rights reserved.