gcc -mno-cygwin -I.. -c dump.c ../flexlink.exe -I/mingw/lib -chain mingw -merge-manifest -exe -o dump.exe dump.o gcc -mno-cygwin -c plug1.c ../flexlink.exe -I/mingw/lib -chain mingw -merge-manifest -o plug1.dll plug1.o gcc -mno-cygwin -c plug2.c ../flexlink.exe -I/mingw/lib -chain mingw -merge-manifest -o plug2.dll plug2.o ./dump.exe plug1.dll plug2.dll INIT Dynamic symbol at 404000 (size = 9) [0] 00401E10: api [1] 00401C46: flexdll_dlclose [2] 00401CF7: flexdll_dlerror [3] 00401A95: flexdll_dlopen [4] 00401C95: flexdll_dlsym [5] 00401D5D: flexdll_dump_exports [6] 00401DD2: flexdll_dump_relocations [7] 00401A56: flexdll_relocate [8] 00401E2B: main OK ** Loading plug1.dll ** handle = 003D25E8 Dynamic symbol at 679c4000 (size = 4) [0] 679C1208: FlexDLLiniter@12 [1] 679C1250: dump_x [2] 679C126D: torun [3] 679C2000: x Dynamic relocation table found at 679c5000 Non-writable relocation in zone 679c127b -> 679c127b 679c127b (kind:0101) (now:98a40b91) api API: plug1.torun(); ** Loading plug2.dll ** handle = 003D2690 Dynamic symbol at 63b84000 (size = 2) [0] 63B81208: FlexDLLiniter@12 [1] 63B81250: torun Dynamic relocation table found at 63b85000 Non-writable relocation in zone 63b8125e -> 63b8129c 63b8129c (kind:0101) (now:03e3ffb0) dump_x 63b81287 (kind:0102) (now:679c2000) x 63b8127e (kind:0102) (now:679c2000) x 63b81268 (kind:0102) (now:679c2000) x 63b81263 (kind:0101) (now:03e3ffe9) dump_x 63b8125e (kind:0101) (now:9c880bae) api API: plug2.torun(); AAA x=10 x = 10 x = 100 AAA x=100