Is it possible to create a new ELF executable file by using assembly? I want to make an ’empty’ executable file and fill its code section after.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s an interesting article which you’ll find useful: A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
It starts off by analysing the size of a tiny C-based executable, and then seeks to make it small as possible by using assembler instead. He gets it from 3998 bytes down to just 45 bytes with a series of increasingly more involved analyses and tricks.
I’m sure if you read and follow along with it, you’ll know more about ELF than you likely needed!