• person rss_feed

    Stefan’s feed

    Blog

    Eine Datei erstellen test.c

    int test(int f) {
    	return 0;
    }
    
    gcc -c test.c -o test.o ; gcc --shared test.o -o test.so ; ldd test.so
    	statically linked
    

    Anpassen der Datei test.c

    #include "string.h"
    
    int test(int f) {
    	char* x = strdup("ABC");
    	return 0;
    }
    
    gcc -c test.c -o test.o ; gcc --shared test.o -o test.so ; ldd test.so  
    	linux-vdso.so.1 (0x00007fff883d0000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1ad7d4c000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007f1ad7f37000)