As per here: https://people.cs.pitt.edu/~xianeizhang/notes/Linking.html#symbol
- global: global symbols that are defined by module m and that can be referenced by other modules. Global linker symbols correspond to
nonstatic funcs and global vars that are defined without the static
attribute.
- external: global symbols that are referenced by module m but defined by some other module. Such symbols are called externals and
correspond to funcs and vars that are defined in other modules.
- local (static): local symbols that are defined and referenced exclusively by module m. Some local linker symbols correspond funcs
and global vars that are defined with the static attribute. These
symbols are visible anywhere within module m, but cannot be referenced
by other modules.
So in simple terms global symbols are non-static,non-extern functions, and non-static, non-extern vars, external symbol are declared with extern, and local symbols are static.
With respect to the linker, is what_is_this a global symbol?
Not extern, not static, so yes
Is x a local symbol?
Declared with a static, so yes
Is v not registered as a symbol?
The linker never sees local variable declarations.(outside of maybe static variables declared in a function.)