Re: Kernel Symbol Clarification
Re: Kernel Symbol Clarification
- Subject: Re: Kernel Symbol Clarification
- From: "Duane Murphy" <email@hidden>
- Date: Wed, 18 Jul 2007 11:21:36 -0700
--- At Wed, 18 Jul 2007 10:23:15 -0700, Garth Cummings wrote:
>Hi Duane,
>
>On Jul 18, 2007, at 8:43 AM, Duane Murphy wrote:
>
>I wanted to make sure I understood how symbols interact in kext's. If I
>use a generally available library and another kext also uses that
>library, will those symbols interact with each other when the kext are
>loaded? That is it possible that my kext will accidentally link to the
>symbols in the other kext using a the same library?
>
>Not sure what you mean by "interact", but I'll take a stab at answering
>the question I think you're asking.
>
>The kernel is one big monolithic namespace. All symbols in KEXTs must be
>unique across the system as they are linked into that one namespace. If
>a KEXT defines a symbol that already exists, the KEXT will not load.
>
>That's why we strongly recommend using reverse-DNS naming for KEXT symbols.
>
>Is that what you meant?
Thanks Garth, I think this is close.
I'll explain in more detail where I am confused and maybe that will help
for me to better understand.
In my mind I am wondering about static linking, if that is the right word.
If I create function called foo() and that function is used in my kext
and created by my kext, and linked into my kext, that function foo is
not need outside of my kext, why would that symbol collide with any
other symbol foo? Aren't all references to foo within my kext already
satisfied and the symbol foo is not really a public symbol at all?
Is there a way to control which symbols in my kext are public and which
are only within my kext and linked at link time rather than load time?
I'm figuring the answer has to do with how mach-o shared libraries
('cause that's what kexts are) are linked.
Thanks for your help,
...Duane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden