summaryrefslogtreecommitdiffhomepage
path: root/patches/nettle-3.8.1.local.patch
blob: 08e0560beaa0a495198c5192bc32bd1dffbed5ac (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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
diff -ru nettle-3.8.1.orig/x86_64/fat/aes128-decrypt-2.asm nettle-3.8.1/x86_64/fat/aes128-decrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes128-decrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes128-decrypt-2.asm        2023-02-17 13:40:13.492569768 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes128-decrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes128_decrypt_aesni,"r"
+        .global __imp__nettle_aes128_decrypt_aesni
+__imp__nettle_aes128_decrypt_aesni:
+        .quad   _nettle_aes128_decrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/aes128-encrypt-2.asm nettle-3.8.1/x86_64/fat/aes128-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes128-encrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes128-encrypt-2.asm        2023-02-17 13:39:44.528569389 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes128-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes128_encrypt_aesni,"r"
+        .global __imp__nettle_aes128_encrypt_aesni
+__imp__nettle_aes128_encrypt_aesni:
+        .quad   _nettle_aes128_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/aes192-decrypt-2.asm nettle-3.8.1/x86_64/fat/aes192-decrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes192-decrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes192-decrypt-2.asm        2023-02-17 13:41:00.400570382 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes192-decrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes192_decrypt_aesni,"r"
+        .global __imp__nettle_aes192_decrypt_aesni
+__imp__nettle_aes192_decrypt_aesni:
+        .quad   _nettle_aes192_decrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/aes192-encrypt-2.asm nettle-3.8.1/x86_64/fat/aes192-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes192-encrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes192-encrypt-2.asm        2023-02-17 13:40:37.196570078 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes192-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes192_encrypt_aesni,"r"
+        .global __imp__nettle_aes192_encrypt_aesni
+__imp__nettle_aes192_encrypt_aesni:
+        .quad   _nettle_aes192_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/aes256-decrypt-2.asm nettle-3.8.1/x86_64/fat/aes256-decrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes256-decrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes256-decrypt-2.asm        2023-02-17 13:44:55.409072440 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes256-decrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes256_decrypt_aesni,"r"
+        .global __imp__nettle_aes256_decrypt_aesni
+__imp__nettle_aes256_decrypt_aesni:
+        .quad   _nettle_aes256_decrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/aes256-encrypt-2.asm nettle-3.8.1/x86_64/fat/aes256-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/aes256-encrypt-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/aes256-encrypt-2.asm        2023-02-17 13:44:31.165072123 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/aes256-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_aes256_encrypt_aesni,"r"
+        .global __imp__nettle_aes256_encrypt_aesni
+__imp__nettle_aes256_encrypt_aesni:
+        .quad   _nettle_aes256_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/cbc-aes128-encrypt-2.asm nettle-3.8.1/x86_64/fat/cbc-aes128-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/cbc-aes128-encrypt-2.asm       2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/cbc-aes128-encrypt-2.asm    2023-02-17 13:45:43.369073067 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/cbc-aes128-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_cbc_aes128_encrypt_aesni,"r"
+        .global __imp__nettle_cbc_aes128_encrypt_aesni
+__imp__nettle_cbc_aes128_encrypt_aesni:
+        .quad   _nettle_cbc_aes128_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/cbc-aes192-encrypt-2.asm nettle-3.8.1/x86_64/fat/cbc-aes192-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/cbc-aes192-encrypt-2.asm       2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/cbc-aes192-encrypt-2.asm    2023-02-17 13:46:09.457073408 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/cbc-aes192-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_cbc_aes192_encrypt_aesni,"r"
+        .global __imp__nettle_cbc_aes192_encrypt_aesni
+__imp__nettle_cbc_aes192_encrypt_aesni:
+        .quad   _nettle_cbc_aes192_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/cbc-aes256-encrypt-2.asm nettle-3.8.1/x86_64/fat/cbc-aes256-encrypt-2.asm
--- nettle-3.8.1.orig/x86_64/fat/cbc-aes256-encrypt-2.asm       2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/cbc-aes256-encrypt-2.asm    2023-02-17 13:46:31.545073697 +0100
@@ -34,3 +34,11 @@

 define(`fat_transform', `_$1_aesni')
 include_src(`x86_64/aesni/cbc-aes256-encrypt.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_cbc_aes256_encrypt_aesni,"r"
+        .global __imp__nettle_cbc_aes256_encrypt_aesni
+__imp__nettle_cbc_aes256_encrypt_aesni:
+        .quad   _nettle_cbc_aes256_encrypt_aesni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/sha1-compress-2.asm nettle-3.8.1/x86_64/fat/sha1-compress-2.asm
--- nettle-3.8.1.orig/x86_64/fat/sha1-compress-2.asm    2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/sha1-compress-2.asm 2023-02-17 12:37:28.782267505 +0100
@@ -32,3 +32,11 @@

 define(`fat_transform', `_$1_sha_ni')
 include_src(`x86_64/sha_ni/sha1-compress.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_sha1_compress_sha_ni,"r"
+        .global __imp__nettle_sha1_compress_sha_ni
+__imp__nettle_sha1_compress_sha_ni:
+        .quad   _nettle_sha1_compress_sha_ni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/sha1-compress.asm nettle-3.8.1/x86_64/fat/sha1-compress.asm
--- nettle-3.8.1.orig/x86_64/fat/sha1-compress.asm      2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/sha1-compress.asm   2023-02-17 12:37:57.546267881 +0100
@@ -32,3 +32,11 @@

 define(`fat_transform', `_$1_x86_64')
 include_src(`x86_64/sha1-compress.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_sha1_compress_x86_64,"r"
+        .global __imp__nettle_sha1_compress_x86_64
+__imp__nettle_sha1_compress_x86_64:
+        .quad   _nettle_sha1_compress_x86_64
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/ghash-set-key-2.asm nettle-3.8.1/x86_64/fat/ghash-set-key-2.asm
--- nettle-3.8.1.orig/x86_64/fat/ghash-set-key-2.asm    2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/ghash-set-key-2.asm 2023-02-17 12:32:21.594437764 +0100
@@ -35,3 +35,11 @@

 define(`fat_transform', `$1_pclmul')
 include_src(`x86_64/pclmul/ghash-set-key.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_ghash_set_key_pclmul,"r"
+        .global __imp__nettle_ghash_set_key_pclmul
+__imp__nettle_ghash_set_key_pclmul:
+        .quad   _nettle_ghash_set_key_pclmul
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/sha256-compress-2.asm nettle-3.8.1/x86_64/fat/sha256-compress-2.asm
--- nettle-3.8.1.orig/x86_64/fat/sha256-compress-2.asm  2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/sha256-compress-2.asm       2023-02-17 12:35:29.438265944 +0100
@@ -32,3 +32,11 @@

 define(`fat_transform', `$1_sha_ni')
 include_src(`x86_64/sha_ni/sha256-compress.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_sha256_compress_sha_ni,"r"
+        .global __imp__nettle_sha256_compress_sha_ni
+__imp__nettle_sha256_compress_sha_ni:
+        .quad   _nettle_sha256_compress_sha_ni
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/sha256-compress.asm nettle-3.8.1/x86_64/fat/sha256-compress.asm
--- nettle-3.8.1.orig/x86_64/fat/sha256-compress.asm    2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/sha256-compress.asm 2023-02-17 12:34:02.826264811 +0100
@@ -32,3 +32,11 @@

 define(`fat_transform', `$1_x86_64')
 include_src(`x86_64/sha256-compress.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_sha256_compress_x86_64,"r"
+        .global __imp__nettle_sha256_compress_x86_64
+__imp__nettle_sha256_compress_x86_64:
+        .quad   _nettle_sha256_compress_x86_64
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/ghash-update-2.asm nettle-3.8.1/x86_64/fat/ghash-update-2.asm
--- nettle-3.8.1.orig/x86_64/fat/ghash-update-2.asm     2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/ghash-update-2.asm  2023-02-17 12:29:12.138435285 +0100
@@ -35,3 +35,11 @@

 define(`fat_transform', `$1_pclmul')
 include_src(`x86_64/pclmul/ghash-update.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_ghash_update_pclmul,"r"
+        .global __imp__nettle_ghash_update_pclmul
+__imp__nettle_ghash_update_pclmul:
+        .quad   _nettle_ghash_update_pclmul
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/memxor-2.asm nettle-3.8.1/x86_64/fat/memxor-2.asm
--- nettle-3.8.1.orig/x86_64/fat/memxor-2.asm   2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/memxor-2.asm        2023-02-17 12:27:46.702434168 +0100
@@ -34,3 +34,11 @@
 define(`fat_transform', `_$1_sse2')
 define(`USE_SSE2', `yes')
 include_src(`x86_64/memxor.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_memxor_sse2,"r"
+        .global __imp__nettle_memxor_sse2
+__imp__nettle_memxor_sse2:
+        .quad   _nettle_memxor_sse2
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/memxor.asm nettle-3.8.1/x86_64/fat/memxor.asm
--- nettle-3.8.1.orig/x86_64/fat/memxor.asm     2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/memxor.asm  2023-02-17 12:25:20.797229091 +0100
@@ -33,3 +33,11 @@

 define(`fat_transform', `_$1_x86_64')
 include_src(`x86_64/memxor.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_memxor_x86_64,"r"
+        .global __imp__nettle_memxor_x86_64
+__imp__nettle_memxor_x86_64:
+        .quad   _nettle_memxor_x86_64
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/cpuid.asm nettle-3.8.1/x86_64/fat/cpuid.asm
--- nettle-3.8.1.orig/x86_64/fat/cpuid.asm      2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/cpuid.asm   2023-02-17 12:20:01.842500301 +0100
@@ -57,3 +57,10 @@
        ret
 EPILOGUE(_nettle_cpuid)

+#ifdef __midipix__
+        .section .got$_nettle_cpuid,"r"
+        .global __imp__nettle_cpuid
+__imp__nettle_cpuid:
+        .quad   _nettle_cpuid
+        .linkonce discard
+#endif
diff -ru nettle-3.8.1.orig/x86_64/fat/ghash-update.asm nettle-3.8.1/x86_64/fat/ghash-update.asm
--- nettle-3.8.1.orig/x86_64/fat/ghash-update.asm       2022-07-27 21:23:20.000000000 +0200
+++ nettle-3.8.1/x86_64/fat/ghash-update.asm    2023-02-17 12:22:38.869226973 +0100
@@ -35,3 +35,11 @@

 define(`fat_transform', `$1_table')
 include_src(`x86_64/ghash-update.asm')
+
+#ifdef __midipix__
+        .section .got$_nettle_ghash_update_table,"r"
+        .global __imp__nettle_ghash_update_table
+__imp__nettle_ghash_update_table:
+        .quad   _nettle_ghash_update_table
+        .linkonce discard
+#endif
diff -ru nettle-3.7.2.orig/x86_64/salsa20-2core.asm nettle-3.7.2/x86_64/salsa20-2core.asm
--- nettle-3.7.2.orig/x86_64/salsa20-2core.asm  2021-03-21 09:32:25.000000000 +0100
+++ nettle-3.7.2/x86_64/salsa20-2core.asm       2021-04-10 14:56:55.970009499 +0200
@@ -316,3 +316,11 @@
        W64_EXIT(3, 13)
        ret
 EPILOGUE(_nettle_salsa20_2core)
+
+#ifdef __midipix__
+        .section .got$_nettle_salsa20_2core,"r"
+        .global __imp__nettle_salsa20_2core
+__imp__nettle_salsa20_2core:
+        .quad   _nettle_salsa20_2core
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/aes-decrypt-internal.asm nettle-3.6/x86_64/aes-decrypt-internal.asm
--- nettle-3.6.orig/x86_64/aes-decrypt-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/aes-decrypt-internal.asm	2020-09-07 13:38:12.793134936 +0200
@@ -150,3 +150,11 @@
 	W64_EXIT(6, 0)
 	ret
 EPILOGUE(_nettle_aes_decrypt)
+
+#ifdef __midipix__
+	.section .got$_nettle_aes_decrypt,"r"
+	.global __imp__nettle_aes_decrypt
+__imp__nettle_aes_decrypt:
+	.quad   _nettle_aes_decrypt
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/aes-encrypt-internal.asm nettle-3.6/x86_64/aes-encrypt-internal.asm
--- nettle-3.6.orig/x86_64/aes-encrypt-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/aes-encrypt-internal.asm	2020-09-07 13:39:17.917132897 +0200
@@ -151,3 +151,11 @@
 	W64_EXIT(6, 0)
 	ret
 EPILOGUE(_nettle_aes_encrypt)
+
+#ifdef __midipix__
+	.section .got$_nettle_aes_encrypt,"r"
+	.global __imp__nettle_aes_encrypt
+__imp__nettle_aes_encrypt:
+	.quad   _nettle_aes_encrypt
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/camellia-crypt-internal.asm nettle-3.6/x86_64/camellia-crypt-internal.asm
--- nettle-3.6.orig/x86_64/camellia-crypt-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/camellia-crypt-internal.asm	2020-09-07 13:40:27.389130722 +0200
@@ -200,3 +200,11 @@
 	W64_EXIT(6, 0)
 	ret
 EPILOGUE(_nettle_camellia_crypt)
+
+#ifdef __midipix__
+	.section .got$_nettle_camellia_crypt,"r"
+	.global __imp__nettle_camellia_crypt
+__imp__nettle_camellia_crypt:
+	.quad   _nettle_camellia_crypt
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/chacha-core-internal.asm nettle-3.6/x86_64/chacha-core-internal.asm
--- nettle-3.6.orig/x86_64/chacha-core-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/chacha-core-internal.asm	2020-09-07 13:41:25.405128905 +0200
@@ -126,3 +126,11 @@
 	W64_EXIT(3, 6)
 	ret
 EPILOGUE(_nettle_chacha_core)
+
+#ifdef __midipix__
+	.section .got$_nettle_chacha_core,"r"
+	.global __imp__nettle_chacha_core
+__imp__nettle_chacha_core:
+	.quad   _nettle_chacha_core
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-curve25519-modp.asm nettle-3.6/x86_64/ecc-curve25519-modp.asm
--- nettle-3.6.orig/x86_64/ecc-curve25519-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-curve25519-modp.asm	2020-09-07 14:01:46.533804910 +0200
@@ -92,3 +92,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_curve25519_modp)
+
+#ifdef __midipix__
+        .section .got$_nettle_ecc_curve25519_modp,"r"
+        .global __imp__nettle_ecc_curve25519_modp
+__imp__nettle_ecc_curve25519_modp:
+        .quad   _nettle_ecc_curve25519_modp
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-curve448-modp.asm nettle-3.6/x86_64/ecc-curve448-modp.asm
--- nettle-3.6.orig/x86_64/ecc-curve448-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-curve448-modp.asm	2020-09-07 14:02:55.749802742 +0200
@@ -142,3 +142,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_curve448_modp)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_curve448_modp,"r"
+	.global __imp__nettle_ecc_curve448_modp
+__imp__nettle_ecc_curve448_modp:
+	.quad   _nettle_ecc_curve448_modp
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-secp192r1-modp.asm nettle-3.6/x86_64/ecc-secp192r1-modp.asm
--- nettle-3.6.orig/x86_64/ecc-secp192r1-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-secp192r1-modp.asm	2020-09-07 14:04:12.289800346 +0200
@@ -86,3 +86,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_secp192r1_modp)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_secp192r1_modp,"r"
+	.global __imp__nettle_ecc_secp192r1_modp
+__imp__nettle_ecc_secp192r1_modp:
+	.quad   _nettle_ecc_secp192r1_modp
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-secp224r1-modp.asm nettle-3.6/x86_64/ecc-secp224r1-modp.asm
--- nettle-3.6.orig/x86_64/ecc-secp224r1-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-secp224r1-modp.asm	2020-09-07 14:05:23.821798106 +0200
@@ -129,3 +129,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_secp224r1_modp)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_secp224r1_modp,"r"
+	.global __imp__nettle_ecc_secp224r1_modp
+__imp__nettle_ecc_secp224r1_modp:
+	.quad   _nettle_ecc_secp224r1_modp
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-secp256r1-redc.asm nettle-3.6/x86_64/ecc-secp256r1-redc.asm
--- nettle-3.6.orig/x86_64/ecc-secp256r1-redc.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-secp256r1-redc.asm	2020-09-07 14:06:51.854540772 +0200
@@ -127,3 +127,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_secp256r1_redc)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_secp256r1_redc,"r"
+	.global __imp__nettle_ecc_secp256r1_redc
+__imp__nettle_ecc_secp256r1_redc:
+	.quad   _nettle_ecc_secp256r1_redc
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-secp384r1-modp.asm nettle-3.6/x86_64/ecc-secp384r1-modp.asm
--- nettle-3.6.orig/x86_64/ecc-secp384r1-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-secp384r1-modp.asm	2020-09-07 14:08:10.706538303 +0200
@@ -232,3 +232,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_secp384r1_modp)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_secp384r1_modp,"r"
+	.global __imp__nettle_ecc_secp384r1_modp
+__imp__nettle_ecc_secp384r1_modp:
+	.quad   _nettle_ecc_secp384r1_modp
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/ecc-secp521r1-modp.asm nettle-3.6/x86_64/ecc-secp521r1-modp.asm
--- nettle-3.6.orig/x86_64/ecc-secp521r1-modp.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/ecc-secp521r1-modp.asm	2020-09-07 14:09:27.370535902 +0200
@@ -156,3 +156,11 @@
 	W64_EXIT(2, 0)
 	ret
 EPILOGUE(_nettle_ecc_secp521r1_modp)
+
+#ifdef __midipix__
+	.section .got$_nettle_ecc_secp521r1_modp,"r"
+	.global __imp__nettle_ecc_secp521r1_modp
+__imp__nettle_ecc_secp521r1_modp:
+	.quad   _nettle_ecc_secp521r1_modp
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/md5-compress.asm nettle-3.6/x86_64/md5-compress.asm
--- nettle-3.6.orig/x86_64/md5-compress.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/md5-compress.asm	2020-09-07 13:44:12.135638069 +0200
@@ -174,3 +174,11 @@
 
 	ret
 EPILOGUE(nettle_md5_compress)
+
+#ifdef __midipix__
+	.section .got$nettle_md5_compress,"r"
+	.global __imp_nettle_md5_compress
+__imp_nettle_md5_compress:
+	.quad   nettle_md5_compress
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/memxor3.asm nettle-3.6/x86_64/memxor3.asm
--- nettle-3.6.orig/x86_64/memxor3.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/memxor3.asm	2020-09-07 13:45:42.443635242 +0200
@@ -261,3 +261,11 @@
 	
 
 EPILOGUE(nettle_memxor3)
+
+#ifdef __midipix__
+	.section .got$nettle_memxor3,"r"
+	.global __imp_nettle_memxor3
+__imp_nettle_memxor3:
+	.quad   nettle_memxor3
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/poly1305-internal.asm nettle-3.6/x86_64/poly1305-internal.asm
--- nettle-3.6.orig/x86_64/poly1305-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/poly1305-internal.asm	2020-09-07 13:51:14.239748557 +0200
@@ -184,3 +184,22 @@
 	ret
 EPILOGUE(_nettle_poly1305_digest)
 
+#ifdef __midipix__
+	.section .got$_nettle_poly1305_set_key,"r"
+	.global __imp__nettle_poly1305_set_key
+__imp__nettle_poly1305_set_key:
+	.quad   _nettle_poly1305_set_key
+	.linkonce discard
+
+	.section .got$_nettle_poly1305_block,"r"
+	.global __imp__nettle_poly1305_block
+__imp__nettle_poly1305_block:
+	.quad   _nettle_poly1305_block
+	.linkonce discard
+
+	.section .got$_nettle_poly1305_digest,"r"
+	.global __imp__nettle_poly1305_digest
+__imp__nettle_poly1305_digest:
+	.quad   _nettle_poly1305_digest
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/salsa20-core-internal.asm nettle-3.6/x86_64/salsa20-core-internal.asm
--- nettle-3.6.orig/x86_64/salsa20-core-internal.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/salsa20-core-internal.asm	2020-09-07 13:53:21.847744562 +0200
@@ -109,3 +109,11 @@
 	W64_EXIT(3, 9)
 	ret
 EPILOGUE(_nettle_salsa20_core)
+
+#ifdef __midipix__
+	.section .got$_nettle_salsa20_core,"r"
+	.global __imp__nettle_salsa20_core
+__imp__nettle_salsa20_core:
+	.quad   _nettle_salsa20_core
+	.linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/serpent-decrypt.asm nettle-3.6/x86_64/serpent-decrypt.asm
--- nettle-3.6.orig/x86_64/serpent-decrypt.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/serpent-decrypt.asm	2020-09-07 13:55:28.667790597 +0200
@@ -714,3 +714,11 @@
 	W64_EXIT(4, 13)
 	ret
 EPILOGUE(nettle_serpent_decrypt)
+
+#ifdef __midipix__
+        .section .got$nettle_serpent_decrypt,"r"
+        .global __imp_nettle_serpent_decrypt
+__imp_nettle_serpent_decrypt:
+        .quad   nettle_serpent_decrypt
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/serpent-encrypt.asm nettle-3.6/x86_64/serpent-encrypt.asm
--- nettle-3.6.orig/x86_64/serpent-encrypt.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/serpent-encrypt.asm	2020-09-07 13:56:00.179789610 +0200
@@ -749,3 +749,11 @@
 	W64_EXIT(4, 13)
 	ret
 EPILOGUE(nettle_serpent_encrypt)
+
+#ifdef __midipix__
+        .section .got$nettle_serpent_encrypt,"r"
+        .global __imp_nettle_serpent_encrypt
+__imp_nettle_serpent_encrypt:
+        .quad   nettle_serpent_encrypt
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/sha3-permute.asm nettle-3.6/x86_64/sha3-permute.asm
--- nettle-3.6.orig/x86_64/sha3-permute.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/sha3-permute.asm	2020-09-07 13:57:35.427786628 +0200
@@ -522,3 +522,11 @@
 	.quad	0x800000000000808A
 	.quad	0x0000000000008082
 	.quad	0x0000000000000001
+
+#ifdef __midipix__
+        .section .got$nettle_sha3_permute,"r"
+        .global __imp_nettle_sha3_permute
+__imp_nettle_sha3_permute:
+        .quad   nettle_sha3_permute
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/sha512-compress.asm nettle-3.6/x86_64/sha512-compress.asm
--- nettle-3.6.orig/x86_64/sha512-compress.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/sha512-compress.asm	2020-09-07 13:58:36.391784719 +0200
@@ -208,3 +208,11 @@
 	W64_EXIT(3, 0)
 	ret
 EPILOGUE(_nettle_sha512_compress)
+
+#ifdef __midipix__
+        .section .got$_nettle_sha512_compress,"r"
+        .global __imp__nettle_sha512_compress
+__imp__nettle_sha512_compress:
+        .quad   _nettle_sha512_compress
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/umac-nh.asm nettle-3.6/x86_64/umac-nh.asm
--- nettle-3.6.orig/x86_64/umac-nh.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/umac-nh.asm	2020-09-07 13:58:59.259784003 +0200
@@ -79,3 +79,11 @@
 	W64_EXIT(3, 7)
 	ret
 EPILOGUE(_nettle_umac_nh)
+
+#ifdef __midipix__
+        .section .got$_nettle_umac_nh,"r"
+        .global __imp__nettle_umac_nh
+__imp__nettle_umac_nh:
+        .quad   _nettle_umac_nh
+        .linkonce discard
+#endif
diff -ru nettle-3.6.orig/x86_64/umac-nh-n.asm nettle-3.6/x86_64/umac-nh-n.asm
--- nettle-3.6.orig/x86_64/umac-nh-n.asm	2020-04-29 20:11:44.000000000 +0200
+++ nettle-3.6/x86_64/umac-nh-n.asm	2020-09-07 13:59:24.655783208 +0200
@@ -273,3 +273,11 @@
 	W64_EXIT(5, 14)
 	ret
 EPILOGUE(_nettle_umac_nh_n)
+
+#ifdef __midipix__
+       .section .got$_nettle_umac_nh_n,"r"
+       .global __imp__nettle_umac_nh_n
+__imp__nettle_umac_nh_n:
+       .quad   _nettle_umac_nh_n
+       .linkonce discard
+#endif