Re: [CentOS] [OT] how does ELF record file scope things?

2013-02-19 Thread Leon Fauster
Am 19.02.2013 um 01:50 schrieb Michael Hennebry henne...@web.cs.ndsu.nodak.edu: On Mon, 18 Feb 2013, Paul Norton wrote: On 18 February 2013 01:56, Michael Hennebry henne...@web.cs.ndsu.nodak.eduwrote: Once the object files from fred.c and greg.c are linked, how does ELF distinguish the

Re: [CentOS] [OT] how does ELF record file scope things?

2013-02-18 Thread Paul Norton
On 18 February 2013 01:56, Michael Hennebry henne...@web.cs.ndsu.nodak.eduwrote: 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

Re: [CentOS] [OT] how does ELF record file scope things?

2013-02-18 Thread Michael Hennebry
On Mon, 18 Feb 2013, Paul Norton wrote: On 18 February 2013 01:56, Michael Hennebry henne...@web.cs.ndsu.nodak.eduwrote: 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? The variables

[CentOS] [OT] how does ELF record file scope things?

2013-02-17 Thread Michael Hennebry
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