Re: is it allowed to declare global variables in shared libraries ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Thu, Jun 17, 2010 at 13:34, rahul patil
<rahul.deshmukhpatil@xxxxxxxxx> wrote:
> Hello all,
>
> My question is simple. Is it allowed to declare global variables in shared
> libraries? if not why ? and if yes then are there drawbacks
> of using such global variables?

Not really a kernel related question, I suppose?

But anyway, I think the reason not declaring global variable (or at
least avoiding it) is to avoid symbol conflict. Since libraries and
the process that links to them operate in the same name space, the
chance we get we get symbol conflict between them is fairly high IMO

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux