Questions tagged [executable-format]
34 questions
22
votes
3 answers
Exec format error 32-bit executable Windows Subsystem for Linux?
When I try to execute a 32-bit file compiled with gcc -m32 main.c -o main on Windows Subsystem for Linux, I get the following error: bash: ./main: cannot execute binary file: Exec format error.
If I compile it without -m32 it runs.
Any solution for…
![](../../users/profiles/1440037.webp)
Ford1892
- 703
- 2
- 7
- 17
16
votes
4 answers
What is symbol table and how is it integrated into the executable?
When I tried to debug an executable:
(gdb) break +1
No symbol table is loaded. Use the "file" command.
What does that mean exactly?
Is the symbol table appended to the executable?
![](../../users/profiles/198729.webp)
user198729
- 55,886
- 102
- 239
- 342
11
votes
9 answers
Why are compiled Java class files smaller than C compiled files?
I would like to know why the .o file that we get from compiling a .c file that prints "Hello, World!" is larger than a Java .class file that also prints "Hello, World!"?
![](../../users/profiles/594778.webp)
Ahmad Soboh
- 674
- 1
- 9
- 17
6
votes
3 answers
Is a core dump executable by itself?
The Wikipedia page on Core dump says
In Unix-like systems, core dumps generally use the standard executable
image-format:
a.out in older versions of Unix,
ELF in modern Linux, System V, Solaris, and BSD systems,
Mach-O in OS X, etc.
Does this…
![](../../users/profiles/8127.webp)
sundar - Remember Monica
- 6,647
- 5
- 40
- 66
5
votes
1 answer
ELF executable file: many zero bytes
Introduction
I'm compiling a simple assembly code (Intel syntax, x86, Linux) printing "Hello World!". Here it is:
SECTION .rodata
msg: db 'Hello world!', 0xA
msg_len: equ $ - msg
SECTION .text
global _start
_start:
mov…
![](../../users/profiles/11248508.webp)
Kolay.Ne
- 1,104
- 6
- 16
5
votes
2 answers
What is the PEI format?
I understand that PE is a modified version of COFF, and that PE+ is a modified version of PE with 64 bit support, but what is PEI? Am I correct in saying there is no difference between PE and PEI, and they can be used interchangeably?
![](../../users/profiles/2558778.webp)
Jeroen
- 11,661
- 11
- 46
- 92
5
votes
1 answer
Is there a linker script directive that allows me to move my stack start address?
I'm trying to change the start location of my stack using a linker script on x86_64.
I was able to move my executable start address using this:
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x200000)); . =…
![](../../users/profiles/1458117.webp)
Ivan Alagenchev
- 482
- 5
- 13
4
votes
2 answers
Are variable identifiers totally needless, at the end of the day?
I've taken a good time studying TOC and Compiler design, not done yet but I feel comfortable with the conceptions. On the other hand I have a very shallow knowledge of assembly and machine code, and I have always the desire/need to connect the two…
![](../../users/profiles/5241338.webp)
Physician
- 151
- 6
4
votes
2 answers
Why are there text function names inside EXE file?
I compiled a C++ program to have an EXE file in release mode. When I open the EXE file in an editor, I see pieces of text blocks, which are mostly the names of used low level functions in the program.
It is always said that the computer only…
![](../../users/profiles/245376.webp)
hkBattousai
- 9,613
- 17
- 66
- 114
3
votes
3 answers
GNU Binutils' Binary File Descriptor library - format example
As in title. I tried reading the BFD's ELF's code, but it's rather not a light reading. I also tried to get something from the documentation, but I would need an example to see how it works. Could anyone point me some easier example for me, to know…
![](../../users/profiles/809387.webp)
Griwes
- 8,163
- 2
- 39
- 69
3
votes
2 answers
What sections are required for a usable ELF executable?
I'm creating an ELF executable file and I need to know what sections are required by the operating system in order to load and execute it.
Details:
OS: Ubuntu 10.04 (64-bit)
Kernel version: 2.6.32-24
Architecture: i386
I…
![](../../users/profiles/193619.webp)
Nathan Osman
- 63,773
- 66
- 242
- 344
3
votes
1 answer
GNAT - GVD: not in executable format: File format not recognized
I'm on an XP Virtual Machine running the GNU Visual Debugger 1.2.6, trying to open an Ada file (.adb), but keep getting the following error:
not in executable format: File format
not recognized
I should also mention that I've installed both the…
![](../../users/profiles/205926.webp)
Old McStopher
- 6,085
- 9
- 58
- 84
3
votes
3 answers
Strange Value in EXE header
I've seen a strange value placed in EXE header
00000000 :4D 5A 90 00 03 00 00 00 - 04 00 00 00 FF FF 00 00
00000010 :B8 00 00 00 00 00 00 00 - 40 00 00 00 00 00 00 00
00000020 :00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00
00000030 :00 00 00 00…
![](../../users/profiles/257530.webp)
oneat
- 9,780
- 15
- 47
- 66
2
votes
3 answers
How do compilers create the executable file at the end of the compilation process?
I've been reading on the compilation process, I understand some of the earlier concepts like parsing but I stop short of understanding how the executable file is created at the end.
In the examples I've seen around the "compiler" takes input in the…
![](../../users/profiles/855072.webp)
chown
- 61
- 4
2
votes
1 answer