mr4th-dynamic-linking/linux_before_main/DETAILS.txt

10 lines
245 B
Plaintext
Raw Normal View History

gcc makes this really easy with a straightforward compiler extension. All we
have to do is write a regular `void f(void)` function and mark it with:
__attribute__((constructor))
Literally that's it. Someone tell Microsoft how cool this is!