Skip to content
Advertisement

Tag: linker

why my x64 process base address not start from 0x400000?

I learned from this link Why is address 0x400000 chosen as a start of text segment in x86_64 ABI? that 64-bit Linux process start address by default should be 0x400000, but on my Ubuntu, I only found my bash process starts from a very high base address (0x55971cea6000). Any one knows why? and how does dynamic linker choose the start

Linker cannot find local shared library

I’m trying a very simple exmaple to create a shared library and link to it. The shared library is as follows: Then the source code file is just as simple: I’m then compiling that into a shared library with: All good, we get an ardgrab.so library so to test it, with the following code in teh same directory as the

Why does the Qemu run differ from the native run?

What did i do? I ran qemu-x86_64 -singlestep -d nochain,cpu ./dummy to dump all the registers of a dummy program after each instruction and used grep to save all the RIP values into a text file (qemu_rip_dump.txt). I then singlestepped the dummy program with ptrace and dumped the RIP values after each instruction into another textfile (ptrace_rip_dump.txt). I then compared

Linker –whole-archive option

I am using C language. I am linking static libraries with –whole-archive. Linker is arm-none-eabi-ld For example, giving the following option to the linker: But still I get linking error: Why is the linking error happening? EDIT: Full command with output: Out put of: readelf -Ws kunit.a hal.a fs.a | egrep ‘ (mmu_init|exec_array|mmu_pagetable|_enter_kernel)’ is: Answer Why is the linking error

Mixing debug and release libraries: Windows vs Linux, static vs shared

This question has been asked a few times already, but I observe that it always refers to Windows. Which makes sense, given that MSVC fails with the following error: error LNK2038: mismatch detected for ‘_ITERATOR_DEBUG_LEVEL’: value ‘0’ doesn’t match value ‘2’ in main.obj And it seems to me that on Linux, it does not fail at build time. Answers mention

Advertisement