Hi,
I am a C & Data Structure teacher at at an institute. Up until now I
have only written classroom type C code. I always had interest in
operating systems especially Linux Kernel but never got into anything
just passively followed 'lwn.net', 'dr dobbs magazine' etc.
But the series '30 Linux Kern
On 22.12.2013 16:51, Ravi Shekhar Jethani wrote:
>
> Now, my real question :
> 1) I cannot understand the reason behind making function prototypes as
> extern. What purpose does this serve? AFAIK we put definition in a .c
> file and the prototype in a .h thats it.
>
> 2) Why are some prototypes
Stefan Beller writes:
> From my understanding there is no
> difference for functions declarations being set to extern or not,
> because extern is the default on functions.
There is a difference for shared libraries if you would like to control
which symbols are exported. With gcc, for example, y
2013/12/22 Jed Brown :
> There is a difference for shared libraries if you would like to control
> which symbols are exported. With gcc, for example, you might compile
> using -fvisibility=hidden. Any functions explicitly declared with
> extern, bearing __attribute__((visibility("default")), or u
Ravi Shekhar Jethani writes:
> To check this I installed the libgit2-dev package which installed:
> /usr/include/git2/*.h , /usr/lib/libgit2.so
> Now, I exported all symbols using:
> $ readelf -s /usr/lib/libgit2.so
> and tried to match these with 'externed' prototypes in the Git source
> director
5 matches
Mail list logo