forked from qt-creator/qt-creator
Use a constructor function instead of one called _init.
This allows us to compile without -nostdlib, which is causing a lot of issues. Reviewed-By: hjk
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int _init(void)
|
||||
int ptracepreload_init(void) __attribute__((constructor,visibility("hidden")));
|
||||
|
||||
int ptracepreload_init(void)
|
||||
{
|
||||
prctl(0x59616d61, getppid(), 0, 0, 0);
|
||||
puts("eeks\n");
|
||||
|
||||
@@ -7,8 +7,6 @@ CONFIG += shared
|
||||
CONFIG -= qt
|
||||
DESTDIR = $$IDE_LIBRARY_PATH
|
||||
|
||||
QMAKE_LFLAGS -= -Wl,--as-needed
|
||||
QMAKE_LFLAGS *= -nostdlib
|
||||
LIBS += -ldl -lc
|
||||
|
||||
SOURCES = ptracepreload.c
|
||||
|
||||
Reference in New Issue
Block a user