Added linking

This commit is contained in:
anon 2024-03-10 15:57:35 +01:00
parent c1f249e103
commit 617aa18acb
3 changed files with 9 additions and 0 deletions

1
linking/h.c Normal file
View File

@ -0,0 +1 @@
int h = 10;

1
linking/i.c Normal file
View File

@ -0,0 +1 @@
int i = 10;

7
linking/main.c Normal file
View File

@ -0,0 +1,7 @@
// @COMPILECMD gcc -shared i.c -o i.so; gcc -shared h.c -o h.so; gcc $@ i.so h.so
extern int i;
extern int h;
signed main(){
return h;
}