From 2ffad537e7dc4e6d70a0873518d4c6a09a5c92fd Mon Sep 17 00:00:00 2001 From: Aoi Koizumi Date: Fri, 18 Mar 2022 17:19:55 -0300 Subject: Say "hello" 40 times to the place where you have tried salt at least once. Signed-off-by: Aoi Koizumi --- gmi/bb85caff.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gmi/bb85caff.txt (limited to 'gmi/bb85caff.txt') diff --git a/gmi/bb85caff.txt b/gmi/bb85caff.txt new file mode 100644 index 0000000..fb81e3c --- /dev/null +++ b/gmi/bb85caff.txt @@ -0,0 +1,25 @@ +ID: bb85caff-be39-47b0-9add-42fae180c796 +Title: OCaml static linking +Authors: Nova[有線魔女] +Date: 2021-09-28T13:36:52-00:00 +Date-Edited: 2022-01-25T13:03:02-03:00 +Topics: Programming > OCaml + +Since quite a while ago (a month or so I guess) I had read this blog post by OCamlPro[1] about generating static PIE with OCaml. +The first project on where I have tried doing so was Logarion[2] , and afterwards bumpmap-tool[2], each using a different build system. +In the 1st case I had to add the field '(flags (:standard -cclib -static))' to the 'cli/dune' file and rebuilt with 'dune build' +As for the 2nd case I added '-cclib -static' to the 'ocamlopt' flags in the command line and rebuilt. + +I ran the ldd command in both (test done on a musl-based distro) only to have this output: + - /lib/ld-musl-x86_64.so.1: (insert executable name here): Not a valid dynamic program + +Which means that it does actually work, but I'm not sure whether it could work for bigger projects. +I think that's all I've got to say here. + +## Links +[1]: +[2]: +[3]: + +## Extras +[Static builds of my own branch of Logarion]: -- cgit 1.4.1-2-gfad0 tion='/acidbong/suckless/dwm/log/config.def.h'>
blob: 3cb562a77ec05f53cf8ec6e9b8e7cd59fafc56df (plain) (blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93