4 ms·
yes and then you'll have a bad time, but at the same time per convention _start is where .text begins. You can see where it starts with readelf --file-header <e
by Keyframe 3y ago
yes and then you'll have a bad time, but at the same time per convention _start is where .text begins. You can see where it starts with readelf --file-header <executable> and look at Entry point address field. You can change it, yes.
- logdahl 3y agoA common hack to reduce ELF size is actually to start the first section (possibly the .text) right on the elf header, as this circumvents the alignment requirements.
- Keyframe 3y agoprobably not even mandatory.. lots of /usr/bin stuff on my ubuntu machine have __libc_start_main only
- Retr0id 3y agoNo, it's not even a convention, _start is most commonly not where .text begins. Compiling a static hello world binary on my system (aarch64 fedora 39, gcc -static hello.c -o hello), .text starts at 0x410080, e_entry is at 0x4103c0, and the _start symbol is also at 0x4103c0. This is not unusual at all.
- deleted 3y ago[deleted]