Skip to main content

Questions tagged [elf]

ELF stands for Executable and Linkable Format, a file format for files containing machine code.

2 votes
2 answers
175 views

I'm making a custom ELF loader to learn how the dynamic loader works behind the scenes, and one of the program headers often found in them is PT_GNU_RELRO, which tells the loader to make that segment ...
Electro_593's user avatar
1 vote
2 answers
117 views

Paths to ELF shared objects in LD_PRELOAD cannot contain spaces, as space is one of the two list separators, and it cannot be escaped: LD_PRELOAD A list of additional, user-specified, ELF shared ...
finefoot's user avatar
  • 3,586
1 vote
0 answers
66 views

I was trying to understand Visibility values in ELF file , and I couldn't Understand the difference between STV_HIDDEN and STV_INTERNAL . After some reseach I found that this may be related to how ...
AbdAllah Talaat's user avatar
5 votes
1 answer
487 views

The latest spec for ELF list many architectures that can be used with it, but some self-assignments are made in the wild (e.g. Chinese LoongArch). Is there anyone coordinating these assignments? ...
DannyNiu's user avatar
  • 722
2 votes
1 answer
276 views

I'm trying to calculate the -o value for extracting an .AppImage file using unsquashfs on foreign architectures/OSs , but using objdump instead of readelf to make the solution more compatible with OSs ...
tresf's user avatar
  • 365
1 vote
1 answer
218 views

Everything mapped in memory is explicit in ELF files except the stack segment. The stack segment is mapped automatically. Why is the stack segment not like other segments, with explicit settings in ...
Tomek Czajka's user avatar
0 votes
0 answers
520 views

I am working on an embedded Linux system (kernel-5.19.20) on MIPS, and I want to build tools/perf for my system. I want to have libelf feature enabled when cross compile perf, so I firstly cross-...
wangt13's user avatar
  • 651
0 votes
1 answer
282 views

I am learning about the relocation from the ELF reference and this blog, but I can't get my head around calculating the relocation address. Suppose we have two files A and B of type ET_REL, we want ...
Question's user avatar
9 votes
1 answer
2k views

I compiled a simple "Hello World" C program on Raspberry Pi 3, which was then transferred to an AMD64 laptop. Out of curiosity, I executed it, and it runs even though I did not expect it to: ...
pico's user avatar
  • 150
1 vote
0 answers
196 views

When compiling a binary on Linux there's this thing called the RPATH, which tells the dynamic loader where to look for the shared objects. What I like about the RPATH is that you can vendor a ...
the_the_the's user avatar
1 vote
1 answer
411 views

Recently I noticed something in several ELF files which looks for me a bit suspicious under Linux. Taking for example "/bin/ls" file and running readelf on it I can see following: There are ...
user2699113's user avatar
1 vote
0 answers
99 views

I am learning the elf file format for Android, but I have found that some elf files can specify the loader through the interpreter path in the program header. However, the elf test file I wrote myself ...
金坷垃金银花茶's user avatar
-1 votes
1 answer
375 views

What's the difference between running a program with ld + --library-path and with changing the loader with patchelf? To illustrate, here is a binary that wouldn't run as is, presumably because of lack ...
ychaouche's user avatar
  • 1,043
3 votes
0 answers
135 views

I have noticed, that Manjaro Linux (kernel 6.6.8) loads 32 bit executable files with ADDR_LIMIT_3GB set. Or as: setarch -B --3g. But I have a clear memory, that earlier it was not the case and 32 bit ...
johnfound's user avatar
  • 263
3 votes
2 answers
2k views

(This is a general question and not a complaint -- there is probably a good explanation for this.) For a compiled executable, why is path to the interpreter hard-coded into the binary as opposed to ...
Cigarette Smoking Man's user avatar

15 30 50 per page
1
2 3 4 5
10