Hacker News new | past | comments | ask | show | jobs | submit login

You haven't linked the program in your assembly example. All the extra code you see there is a result of the libc startup code. Decompilers work starting from then entry point (not your program's main), which is why there's so much extra code. If you look at just the code starting from main, you get something much simpler:

    int64_t puts = 0x4003e6;

    void func_4003e0(int64_t rdi) {
        goto puts;
    }

    int64_t main() {
        func_4003e0("Hello, World!");
        return 0;
    }



Alright, that makes much more sense. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: