I’m trying to write some assembly programs using nasm on linux. Everything is good, but I make heavy use of local symbols (.loop, .else, etc.), which is a pain when debugging, because these symbols are emitted to the symbol table, e.g.: will produce a disassembly that looks like: which is a bit annoying…
Tag: linker
Is shared standard C library first initialized by kernel?
I’m trying to understand the operation of linker and loader, and memory addresses(physical or virtual) regarding how a program is actually compiled and executed. I encountered two pieces of information and formed my own version of comprehension. 1st information: W.5.1 SHARED OBJECTS In a typical system,…
makefile linking does not work (although no error message)
I am having issue with Makefile that I produced. It consists of one .cpp file with main() inside and I want to create executable from it. While putting in terminal make command I get following: While putting first make STutorial.o (.o created) and then make get this: Firstly, why make does not go from the beg…
Dynamic library timing and CPU load analysis in linux
I am writing code with one dynamic library. When I used dlopen/dlsym calls to access library functions, cpu load and execution is more as compared to linking library dynamically using -l and accessing function directly. Can anyone help to understand why this is happening? Answer Static linking requires more t…
gcc linker (ld) can’t find shared libraries
I’ve trying to cross compile an app for iMX6 CPU using linaro-gcc and a dedicated rootfs. The app might be linked to OpenVG and the standard pthread libraries. It compiles fine but the linker failed to link to the OpenVG library so I added the linker switch -L/home/ae/Documents/toradex/col-imx6/colibri-…
Symbols not found during linking
I have a problem with a shared library (Linux) and a program that links against this library but does not find the symbols – although they are there. That’s what I have: A shared library “libetest.so” that is located in /usr/lib. When I do an it gives (beside some others) this output: …
Cross compiling for Linux on Windows (linker output file won’t run as executable on linux and has undefined symbols)
I’m trying to set up a cross compile for linux ELF files on Windows using clang and a version of ld which has been compiled to have elf64 support. The clang compile part is fine, it outputs ELF obj files that work when linked on linux. My test case cpp is just main containing a printf statement. To atte…
how can I guide compiler to use a certain library?
I’m trying to compile skeltrack according to this guide http://tayyabnaseer.blogspot.com.tr/2012/05/installing-skeltrack-on-ubuntu.html I successfully compiled and installed first two libraries. However when it comes to skeltrack I get followin compilation error: I am on Ubuntu 13.10 32 bit platform. I …
Why a stripped binary file can still have library call information in the disassembled file?
test platform is 32 bit Linux. I compile a c program without strip the symbol information, and use objdump to disassembly the elf executable file. Here is part of the results. If I use: to remove the symbol info and use objdump to disassembly the elf executable file again, I can still see the results like: So…
missing lboost_thread-mt in mongodb cpp driver (ubuntu server x64)
i have a brand new ubuntu server x64. i installed the following packages build-essential libboost-all-dev mongodb-dev mongodb-10gen now when i try to compile the example code i get this error. root@server:/home/user/Desktop# g++ mongotest.cpp -pthread -lmongoclient -lboost_thread-mt -lboost_filesystem -lboost…