Determine direct shared object dependencies of a Linux binary?

You can use readelf to explore the ELF headers. readelf -d will list the direct dependencies as NEEDED sections. $ readelf -d elfbin Dynamic section at offset 0xe30 contains 22 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.0.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x400520 0x000000000000000d (FINI) 0x400758 …

Why is the ELF execution entry point virtual address of the form 0x80xxxxx and not zero 0x0?

As Mads pointed out, in order to catch most accesses through null pointers, Unix-like systems tend to make the page at address zero “unmapped”. Thus, accesses immediately trigger a CPU exception, in other words a segfault. This is quite better than letting the application go rogue. The exception vector table, however, can be at any … Read more

How to make an executable ELF file in Linux using a hex editor?

Decompile a NASM hello world and understand every byte in it Version of this answer with a nice TOC and more content: http://www.cirosantilli.com/elf-hello-world (hitting the 30k char limit here) Standards ELF is specified by the LSB: core generic: http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/elf-generic.html core AMD64: http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-AMD64/LSB-Core-AMD64/book1.html The LSB basically links to other standards with minor extensions, in particular: generic … Read more