All the standard shared libraries on my Linux system (Fedora 9) specify ELFOSABI_NONE (0) as their OSABI.
This is fine - however I've received a shared library from a supplier where the OSABI given in the ELF header is ELFOSABI_LINUX (3).
This doesn't sound like an unreasonable value for a shared library intended for a Linux system, ho...
I mean could a single binary file run in both Win32 and Linux i386 ?
...
I've written an interface to the code generator that lets me produce shared objects. Though I do not want o implement support for section header table because that's where the majority complexity of ELF file format remains in.
GNU ld uses section headers for linking against shared objects. This means that when I try to put gcc link agai...
I'm confusing little in terminology.
A file that is given as input to the linker is called Object File.
The linker produces an Image file, which in turn is used as input by the loader.
I got this from "MS PE & COFF Specification"
Q1. Image file is also referred to as Binary Image, Binary File or just Binary. Right?
Q2. So, a...
why is the entry point in each ELF binary something starting with 0x80xxxxx?
Why doesn't the program start at (virtual) address 0x0?
When executed, program will start running from virtual address 0x80482c0 (see entry point address). The "0x" prefix here means it is a hexadecimal number. This address doesn't point to our main() procedure...
How to track code using ARM ELF? Which tools we have to use?
...
Hello,
There are lots of PE file browsers. Here is a list of good ones if you are interested:
PE File format viewers:
PE Explorer http://www.pe-explorer.com/
PE VIew: http://www.magma.ca/~wjr/
PEBrowse Professional http://www.smidgeonsoft.prohosting.com/pebrowse-pro-file-viewer.html
PE Browse Professional Interactive ...
I want to write a little function's tracer. I use ptrace.
When I see a CALL instruction, I want to show the function name equivalent to the address call.
My tracer work with symbols with absolute address (symbol define in the main binary).
But I don't know how I can get the absolute address in virtual memory of the function of the shar...
Hi,
I want to write a little function's tracer. I use ptrace.
I'm on ubuntu x86_64. I want to found the address of the shared library function (like printf).
But i have some problem and some question about the Global Offset Table.
I have the following code:
size_t baseAddress = this->getBaseAddress();
Elf_Ehdr const * headerElf = sta...
Hi All,
I trying to write elf executable loader program for ARM platform.I have some Queries here
1) How to generate relocatable or position independent ELF executable(what are the compiler & linker options) 2) How to load this above generated ELF executable file.
As astart , i did some work and it is working fine. I am using a fi...
There are things in ARM elf binaries I'd like to understand better.
I need to figure this out get my homebrew assembler output ELF executables for gp2x f200. So I started by compiling this program with open2x cross-compiling toolchain:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(){
chdir("/usr/gp2x");
ex...
I have a few questions:
Why was a.out replaced by ELF?
What were the major flaws in the a.out format that led to the raise of ELF file format?
Earlier core dumps were based on a.out, but now they are based on ELF. What are the various advantages provided by ELF?
...
I want to know the difference between "Local Linker Symbols" & "Local Program Variables"?
I'm reading a book which has this:
What does each mean? Any examples?
...
I'd like to retrieve the GCC version used to compile a given executable. I tried readelf but didn't get the information. Any thoughts?
-Ilyes
...
In ELF file format we have an Alignment field in Segment Header Table aka Program Header Table.
In case of Windows PE file format they take it to next level the Sections have two alignment values, one within the disk file and the other in memory. The PE file header specifies both of these values.
I didn't understand a thing about this...
The final images produced by compliers contain both bin file and extended loader format ELf file ,what is the difference between too , especially the utility of ELF file.
...
Hi
What's the best tool for converting PE binaries to ELF binaries?
Following is a brief motivation for this question:
Suppose I have a simple C program.
I compiled it using gcc for linux(this gives ELF), and using 'i586-mingw32msvc-gcc' for Windows(this gives a PE binary).
I want to analyze these two binaries for similarities, using...
Hi,
I'm trying to build a program against wxWidgets, and I get a linker error. I'd like to really understand what it means. The error is:
/usr/lib/libwx_baseu-2.8.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'
What I don't understand is why the error is at libwx_baseu-2.8.so. I thought that .so fi...
For global variables in C like
int aglobal = 5;
When does the 5 get transferred into aglobal by the loader and how does it know to put 5 in aglobal.
Same situation with a static declaration in a function. Like
int afunc()
{
static int astatic = 8;
return astatic;
}
...
Hi,
I've been looking at Linux elf executables on x86, mostly using IDA but
also gdb. One thing I've noticed is functions are always loaded
at word aligned addresses? Anybody knows the reason of that?
I am not aware of any requirement of x86 instructions to start
at aligned addresses. And it cannot be due to page alignment cause
the pag...