i’ve been working on my kernel project and to simulate it (that is to run it on QEMU), i need it as a .iso file. I have an assembly file and to assemble it – as –32 boot.s -o boot.o and for the main code (which is in c++), to compile it – gcc -S kernel.cpp -lstdc++ -o kernel.o gives
Tag: ld
How to make a custom section executable (other than .text)
Basic Hello World as seen many times before on x86_64 Linux: My current ld linker script: Invoked with: I’m currently getting a segfault. Inspecting the output of readelf -a I can see that my_section does not have executable permissions. I believe this is causing the segfault. If I replace it with .text : { *(.my_section*) } > rom it still
what is segment 00 in my Linux executable program (64 bits)
Here is a very simple assembly program, just return 12 after executed. It can be built and executed correctly: But the size of a.out is big, it is more than 4k: I try to understand it by reading elf content: it is strange, segment 00 is aligned by 0x1000, I think it means such segment at least will occupy 4096
Why do I need to set LD_LIBRARY_PATH after installing my binary?
My application is linking to a self-compiled Qt that lies in /usr/local/lib. This works fine when I start my application in the build dir. However, after I have installed my application to /usr/local/bin/ it tries to load incompatible system Qt lib that doesn’t have required symbols and fails. Why? How does the actual location of my binary affect which Qt
x86_64-conda_cos6-linux-gnu-ld: cannot find -lc
I cannot install most of new packages in R, because of the following error: x86_64-conda_cos6-linux-gnu-ld: cannot find -lc. in some cases it is cannot find x86_64-conda_cos6-linux-gnu-ld: cannot find -lm Based on this post, the -l option is for linking dynamic libraries. This post suggests sudo yum install glibc-static. But, I have no administration permission. Any help is highly appreciated. Answer
Dumpout Process Memory Layout During Loading Time
I am working on a project where I need to use LD_PRELOAD to load some libraries into the memory space. It’s like: Due to certain reasons (I am actually working on some binary hacking), I must know the memory address (not a symbol) of certain functions (let’s say, foo) in libapp.so and instrument the binary code of my_app before execution.
Using uclibc linker for glibc compiled binary?
I have a binary which I need to get working on an embedded system which uses uclibc, the binary was compiled against glibc, should this work? I get an error saying that the binary doesn’t exist when I try to run it, so I checked what libraries were missing. I was able to symlink all of these but one to
R: install package tkrplot. Error message: ld: cannont find -lXss
I want to install the tkrplot package for R on my opensuse42 computer using install.packages(“tkrplot”,dep=TRUE) However, I get an error message and i dont know how to proceed. gcc -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o tkrplot.so tcltkimg.o -L/usr/lib64 -ltcl8.6 -L/usr/lib64 -ltk8.6 -L/usr/lib64 -lX11 -lXss -lXext -L/usr/lib64/R/lib -lR /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lXss collect2: error: ld returned 1 exit status /usr/lib64/R/share/make/shlib.mk:6: recipe for
Resolving symbols differently in different dynamically loaded objects
After reading these questions, I’m looking for some more detail about how to control symbol resolution order. In my problem, I have main executable exec. exec dynamically links to a.so and c.so. a.so dynamically links to b.so. b.so calls function foo, which is normally provided by c.so but in this case is also provided by exec. b.so only works with
Visual Studio 2015/Linux extension produces a “collect2 : error : ld returned 1 exit status” with Cygwin
I am currently trying the Linux Extension of Visual Studio 2015. I plan to have several target machines using various distribs. So far, my testing machine is a Windows 7 with an up-to-date Cygwin with all needed packages (openssh, g++, gdb…) installed. The test I’m conducting consists in a very simple C++ “Hello world” file, and the VS projects settings