Add to git.
[pthrlib.git] / README.openbsd
1 Notes on the OpenBSD port
2 -------------------------
3
4 You need the gcc toolchain, GNU make, postgresql, pcre installed.
5
6 OpenBSD has a serious bug in the order constructors in shared libraries
7 are called. It calls them in, essentially, a random order, instead of
8 in dependency-order. See the following newsgroup article:
9
10 http://groups.google.com/groups?selm=b049u2%24227u%241%40FreeBSD.csie.NCTU.edu.tw&oe=UTF-8&output=gplain
11
12 I have added some grotesque hacks to work around this problem.
13
14 For pthr_context.c, I found the contents of jmp_buf by examination
15 in gdb. jmp_buf is an array of 10 longs with the following layout:
16
17         offset  contents
18         0       PC (return address)
19         1       ebx
20         2       SP (stack pointer)
21         3       ebp
22         4       esi
23         5       edi
24         6       ?
25         7       ?
26         8       ?
27         9       ?
28
29 Rich 2003/01/26