Shared Libraries vs DLLs [Answered]

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

JamesM wrote::? so use --retain-symbols-file ...? :?

You're just describing the default, "out of the box" setup.
Hmmm... I haven't used that switch before. The one I've seen to hack around the difference I described is -Bsymbolic, which on Solaris 9 caused global constructors and destructors in the shared library to not run (probably because .init and .fini got killed or something).

In any case, if you can make ELF shared libraries behave like Windows DLLs, I think it's a safe bet that you can't do the opposite.

<edit>
BTW, is using --retain-symbols-file considered common practice? I'm pretty sure the use of -Bsymbolic is highly discouraged, at least on Solaris...
</edit>
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

<edit>
BTW, is using --retain-symbols-file considered common practice? I'm pretty sure the use of -Bsymbolic is highly discouraged, at least on Solaris...
</edit>
I'm sorry, I have no idea! I use it to export only certain symbols from my kernel - I'm not sure if it's heavily used elsewhere.
Post Reply