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…
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?
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!"?
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…
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…
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?
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)); . =…
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…
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…
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…
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…
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…
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…
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…
2
votes
1 answer

What is RVA and VA?

Please explain what RVA and VA means
Jaebum
  • 1,075
  • 9
  • 26
1
2 3