summaryrefslogtreecommitdiff
path: root/docs/libraries/README
blob: 69e789d81414bb55e5a054f1fd6a525097f512c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Sun and Linux linking in detail
http://www.tldp.org/HOWTO/Program-Library-HOWTO/

APR rules for versioning
http://apr.apache.org/versioning.html

The Sun Linker and Library Guide
http://dlc.sun.com/pdf/817-3677/817-3677.pdf

Nice Makefile examples how to do it without libtool and other unnecessary
helpers:
http://www.cse.iitb.ac.in/dbms/Data/Courses/CS631/PostgreSQL-Resources/postgresql-8.1.4/src/Makefile.shlib
http://root.cern.ch/root/Makefile.html

Some more unsorted links:
- http://www.linuxjournal.com/article/3687: on C/C++ dlopen usage
- http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx: LoadLibrary on Windows
- http://en.wikipedia.org/wiki/Dynamic_loading
- On MacX: http://developer.apple.com/mac/library/releasenotes/DeveloperTools/RN-dyld/index.html
- http://www.flounder.com/loadlibrary_explorer.htm: how LoadLibrary works
  internally (search path for DLLs, security, etc.)
- http://tldp.org/HOWTO/Program-Library-HOWTO/dl-libraries.html: explainig about
  the dlerror odity around dlsym

Goal:
- we want abstractions for varying versions of
  dlopen/LoadLibrary(Ex) etc. modern Unix and Win32 suffice, rest is easy to
  add (Darwin, HPUX)
- only basic functionality, no module magic versions or other stuff, should
  be in a separate library
- have the error handling right
- layer on top should support something like a module X in version
  Major.Minor and a loader which checks what can be checked, should
  also help us enumerate the symbols in a library (introspection)
- No init/deinit code: reason, we can live without it (we are C so our
  structure can easily be initialized in a Initialize/Deinitialize which
  we enforce on the module loader), _init and friends are used by compilers
  and are dangerous, because we don't really know when they are called!

Unsorted ideas from older times:
- unregister all loaded libraries, so we can properly shutdown without
  knowing what has been loaded. Not really crutial.
- the library known a specific symbol 'registry', containing an object
  with:
  - global unique identifier, so we don't load something different by accident
  - a library identifier unique per library
  - a signature per function to allow proper casts