Commit 7ac48631 authored by Chu's avatar Chu

replace ctor with _init

parent 9ed70b67
add_library(evil SHARED evil.c evil.h)
set_target_properties(evil PROPERTIES LINK_FLAGS "-s")
set_target_properties(evil PROPERTIES LINK_FLAGS "-nostartfiles -s")
......@@ -2,7 +2,7 @@
#include <stdio.h>
void __attribute__((constructor)) init()
void _init()
{
puts("hello, world");
}
#ifndef LINUX_LIBRARY_INJECT_EVIL_H
#define LINUX_LIBRARY_INJECT_EVIL_H
void __attribute__((constructor)) init();
void _init();
#endif // LINUX_LIBRARY_INJECT_EVIL_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment