Any tool/software in windows for viewing ELF file format? [closed]

readelf and objdump are both excellent utilities if you are on a Unix box. Both are provided by Cygwin. readelf will give you a good overview of the ELF header information, section headers. You can also use it to get relocation and symbol information. Overall, readelf can give greater detail on the contents of an … Read more

Processing ELF relocations – understanding the relocs, symbols, section data, and how they work together

I stumbled across this question and thought it deserved an answer. Have elf.h handy. You can find it on the internet. Each RELA section contains an array of Elf32_Rela entries as you know, but is also tied to a certain other section. r_offset is an offset into that other section (in this case – it … Read more

Is there a downside to using -Bsymbolic-functions?

Answering my own question because I just earned a Tumbleweed badge for it… and I found out subsequently But I was wondering whether there is perhaps a finer-grained control over this, like overwriting -Bsymbolic for individual function definitions of a library. Yes, there is the option –dynamic-list which does exactly that Should I be aware … Read more

What do the .eh_frame and .eh_frame_hdr sections store, exactly?

Please, see cfi-directives It should cover history and theory of most of the sections in question. About eh_frame, it contains exception unwinding and source language information. Each entry in this section is represented by single CFI (call frame information ) see, eh_frame in linuxfoundation eh_frame_hdr, is used by c++ runtime code to access the eh_frame. … Read more

.bss vs COMMON: what goes where?

// file a.c // file-scope int a = 0; // goes into BSS after compilation of a.c into object file a.o, a symbol goes into BSS section. // file b.c // file-scope int b; // goes into COMMON section after compilation of b.c into object file b.o, b symbol goes into COMMON section. After linking … Read more

Meaning of a Common String In Executables?

Interesting question. Since I didn’t know the answer, here are the steps I took to figure it out: Where in the file does the string occur? strings -otx /bin/gzip | grep AWAVAUATUSH 35e0 AWAVAUATUSH 69a0 AWAVAUATUSH 7920 AWAVAUATUSH 8900 AWAVAUATUSH 92a0 AWAVAUATUSH Which section is that in? readelf -WS /bin/gzip There are 28 section headers, … Read more

Why is address 0x400000 chosen as a start of text segment in x86_64 ABI?

Bottom line: some technical limitations that amd64 has in using large addresses suggest dedicating the lower 2GiB of address space to code and data for efficiency. Thus the stack has been relocated out of this range. In i386 ABI1 stack is located before the code, growing from just under 0x8048000 downwards. Which provides “a little … Read more

tech