Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Shared Libraries

Name: Anonymous 2011-05-23 10:02

Why are shared libraries so complex and brain dead? I mean, in order to get it working properly you have to sprinkle every one of your functions with __attribute__((visibility(public)) and set the  default visibility to hidden via a compiler switch. That amount of complexity just doesn't seem worth it.

I originally tried to make one my libraries efficiently support shared library builds, but I'm fucking done, after several days of trying to get it to work, the amount of time I've put into this effort, and the amount of time I'm going to have to waste maintaining it is just not going to pay off for me.

Name: Anonymous 2011-05-23 10:15

#define PUBLIC __attribute__((visibility(public))

Name: Anonymous 2011-05-23 10:22

that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things that why we cant have nice things

Name: Anonymous 2011-05-23 10:28

http://harmful.cat-v.org/software/dynamic-linking/

Shared Libraries and Dynamic Linking considered harmful.

Name: Anonymous 2011-05-23 10:32

Someone needs to make a GNU/Linux that uses only static libraries, and just not have X11/X.org due to how bloated it is (which was one of the first major use cases for shared libraries)... use something like Wayland without the X11 emulation module.

Name: Anonymous 2011-05-23 10:49

Name: Anonymous 2011-05-23 11:16

>>5
That should be easy using a source based distro such as Gentoo or Source Mage. However, I'm not quite sure of how mature the QT and GTK ports to Wayland are coming along. I'm quite wary of how fat the gui binaries would be with a full Wayland/driver/toolkit stack.

Name: Anonymous 2011-05-23 12:33

>>1
Learn a Lisp.

Name: Anonymous 2011-05-23 12:36

Dynamic Linking on Windows is pretty fine, but if you go into versioning it can get a bit messy if you don't know what you're doing. I tend to prefer it to static linking as it leads to small binaries and binary modularity where you could replace some module with an improved version without having to replace the whole thing.

Name: Anonymous 2011-05-23 14:52

>>9
Sadly, Microsoft solved this problem with a directory called WinSxS. Go find it in your installation (or a friend's) and figure out what it does by examination.

Et voilà: you are now crying.

Name: Anonymous 2011-05-23 14:54

>>8
which one?

Name: Anonymous 2011-05-23 14:56

Name: Anonymous 2011-05-23 14:59

WinSxS is pigdisgusting

Name: Anonymous 2011-05-23 15:08

>>13
You have to type it in all caps to count.

Name: Anonymous 2011-05-23 15:20

>>9
Yes, it leads to smaller binaries at first glance, but the pay off is only there if the shared library is actually shared by more than a handful of executables or other libraries. Static linking almost always wins if the library is only used by a few executables, due to dead-code stripping. Plus static linking always wins when it comes to performance, as function calls across shared library boundaries don't have to be position independent (ie. indirect or through an import library stub).

Name: Anonymous 2011-05-23 15:47

>>10
I know. I tend to prefer DLLs in the application's directory, unless it's a standard system dll, in which case I'll gladly link to it like everyone else. On the other hand, if WinSxS didn't exist, you could implement your own versioning system without too much trouble. WinSxS is quite ENTERPRISE.

Don't change these.
Name: Email:
Entire Thread Thread List