42 questions
3
votes
1
answer
116
views
IMAGE_FILE_HEADER.TimeDateStamp not a Unix epoch on certain DLLs
IMAGE_FILE_HEADER.TimeDateStamp is described as:
The low 32 bits of the time stamp of the image. This represents the date and time the image was created by the linker. The value is represented in the ...
0
votes
0
answers
75
views
Load, relocate and execute function symbol from elf in bare-metal ARMv7-A system
Consider a minimal c source with a simple function symbol inside it like so(for now without any global or read-only variables):
main.c:
int test_mul(int arg) { return arg * 2; }
int main() {return 1;}...
-1
votes
1
answer
153
views
What is the first argument to Apple's getsectiondata function?
I need to access binary resources wrapped by ld -sectcreate. Some newer materials (such as comments in this answer) told that I should use getsectiondata instead of getsectbyname to correctly work ...
4
votes
1
answer
144
views
creating Linux i386 a.out executable shorter than 4097 bytes
I'm trying to create a Linux i386 a.out executable shorter than 4097 bytes, but all my efforts have failed so far.
I'm compiling it with:
$ nasm -O0 -f bin -o prog prog.nasm && chmod +x prog
...
6
votes
1
answer
974
views
Magic value collision between MachO fat binaries and Java class files
Both Java .class files and Mach-O fat binaries have the same magic signature, 0xCAFEBABE. When reading binary files, what's a good way to disambiguate?
0
votes
1
answer
349
views
Converting python file into executable in ubuntu 12.04 OS
I have developed a python script to automate few things present in text file.
when converted this python file to the executable in ubuntu20.04 version(through pyinstaller) works very well.
The same ...
12
votes
2
answers
3k
views
Why are executables called "image files"?
I'm reading the PE format document. In the document, the word "image" appears many times and seems always comes along with the word "executable". However, it doesn't explain why &...
6
votes
1
answer
1k
views
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 $ ...
2
votes
1
answer
989
views
How to make R executable file
Is it possible to create an executable file where I can just upload the excels and an output is generated based on the coding and without sharing it as well.
0
votes
0
answers
2k
views
"Exec Format Error" while trying to run a program
First of all, sorry for my english !
OS: XUbuntu VM.
I am trying to compile an executable with a Makefile using clang-9.
I initially faced a permission denied error. Fixed it with chmod.
Now, when ...
0
votes
1
answer
91
views
How to detect architecture of an LE (linear executable) file?
What instruction set architecture does an LE (linear executable) file have? The linked article says: mixed 16/32 bit.
Does it mean that the same LE file can contain 16-bit and 32-bit code?
How do I ...
0
votes
1
answer
365
views
How to convert Python code to executable?
So I have a python code now that I want other folks to use. They don't have Python installed on their computers.
I have seen people convert their code to .exe so others can use it even if they don't ...
0
votes
0
answers
585
views
Add big (> 2GB) resource asset to an executable
I want to make a simple, minimalist custom cross-platform installer for a specific Qt application. The installer looks like this:
But in one use-case, the data to store there is > 5GB long. I have ...
-3
votes
1
answer
281
views
Linux executable file format. Where is the specification?
I want to understand how Linux executable file is consisted of. Where can I get the specification?
I compiled a simple assemble file with gcc but the generated file size is much bigger than I ...
1
vote
0
answers
245
views
Prevent user to execute Executable file in windows Operating system
I have an executable file called "XXX" and I want to prevent user to execute this executable file, so i have used this link to solve the problem, and it's working fine.
https://www....
0
votes
1
answer
401
views
Is a registered custom executable format also described by an object of type `linux_binfmt`?
Understanding the Linux Kernel says
An executable format is described by an object of type linux_binfmt,
which essentially provides three methods: load_binary, load_shlib,
and core_dump.
and
...
0
votes
1
answer
88
views
All .txt files are not being read after converting my java program into an executable file
My java program contains two operations that uses data's stored in two different .txt files. It works completely fine when running using Netbeans but ones I make it into an executable file, the values ...
26
votes
3
answers
34k
views
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 ...
0
votes
1
answer
697
views
How can I use otool to get the size of a binary file?
I'm using otool to get information about my binary. Here is part of my output:
Load command 0
cmd LC_SEGMENT_64
cmdsize 72
segname __PAGEZERO
vmaddr 0x0000000000000000
vmsize ...
1
vote
1
answer
2k
views
How is a process created from an ELF file?
Can anyone please share some link or book that explains in detail about how a process is created from an ELF file. Most of the materials freely available seems to be abstract with out explaining most ...
4
votes
2
answers
149
views
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 ...
5
votes
2
answers
3k
views
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.
...
8
votes
2
answers
4k
views
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 ...
1
vote
1
answer
650
views
How to tell if /GS compiler is enabled for a PE Win32
I am able to parse ASLR, DEP, SEH, etc. from the DOS headers but not sure how to tell if the file was compiled with /GS stack canaries.
I am writing a program, so pointing me to a program like ...
3
votes
3
answers
2k
views
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'...
-3
votes
1
answer
159
views
Saving python script in executable format
How do I save the python script that I'm working on in executable format in a specific folder? Saving manually is not allowed. The code for saving must be within the script itself. Thanks in advance.
6
votes
3
answers
3k
views
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, ...
1
vote
2
answers
195
views
Library for generating independent windows executable in Java or C++
I am not trying to compile my source code into an executable. Please read before marking as duplicate.
With that said, I apologize if this question has been asked before. The countless "how do I ...
6
votes
1
answer
2k
views
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-...
-1
votes
3
answers
270
views
What executable format normally results in smaller file sizes?
What executable format normally results in smaller file sizes? For example, I've heard the a.out format is smaller than ELF's. This question is cross platform, so MS-DOS too.
1
vote
1
answer
2k
views
Monitoring executable file
I have a program I purchased several years ago, the last years when I install a new windows I was call my software programmer to install it again on my PC.
Now I can't find this guy and want to open ...
12
votes
1
answer
7k
views
What are the differences between PE and ELF binary formats? [closed]
What is the difference between Windows PE binary and Linux ELF binary formats? How does a compiler convert a file into the specified format of the operating system when it should only create the ...
4
votes
3
answers
6k
views
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 ...
2
votes
3
answers
552
views
can a .com executable run on other OS besides windows?
I understand that the extension of the executables .com .exe etc is meant for the operating system. It has got nothing to do with the underlying ISA (be it x86 or SPARC). Am I correct?
does .com ...
3
votes
1
answer
2k
views
mingw gcc compilation and gdb debugging
I think how gdb works on Windows under mingw?
When compile with mingw C into .exe, it creates PE file, right (so Windows can run it).
But then you want debug the .exe with gdb. This gdb knows to ...
12
votes
9
answers
5k
views
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!"?
3
votes
1
answer
2k
views
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 ...
3
votes
1
answer
2k
views
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 ...
0
votes
1
answer
2k
views
How to change the assemblyIdentity of an executable?
I want to hide the tool I used to create an .exe file. I am not doing anything illegal, I just want to protect my intellectual property from being copied. If I open the exe file in a text editor I see ...
22
votes
4
answers
44k
views
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?
4
votes
3
answers
4k
views
Strange Value in EXE header
I've seen a strange value placed in an 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 ...
3
votes
1
answer
3k
views
What is RVA and VA? [closed]
Please explain what RVA and VA means