fred.c: static void sfunc(int *p) { *p=1; } static int x;
void fred(void) { ... sfunc(&x); ... }
greg.c: static void sfunc(int *p) { *p=2; } static int x;
void greg(void) { ... sfunc(&x); ... }
Once the object files from fred.c and greg.c are linked, how does ELF distinguish the sfunc's and the x's? I've been trying to RTFM, but it hasn't helped?