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
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
|
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/lib/Makefile.lib
CAPDIR = capabilities
SUBDIRS = $(MACH64) $(PLATFORMS)
all : TARGET= all
clean : TARGET= clean
clobber : TARGET= clobber
install : TARGET= install
.KEEP_STATE:
.PARALLEL: $(SUBDIRS)
all clean clobber install: \
$(CAPDIR) .WAIT $(SUBDIRS)
install_h: $(ROOTHDRS)
check: $(CHECKHDRS)
$(CAPDIR) \
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
FRC:
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2017 Jason King.
# Copyright (c) 2018, Joyent, Inc.
#
# AES
AES_DIR = $(SRC)/common/crypto/aes
AES_COMMON_OBJS = aes_impl.o aes_modes.o
AES_COMMON_SRC = $(AES_COMMON_OBJS:%.o=$(AES_DIR)/%.c)
AES_FLAGS = -I$(AES_DIR)
# Blowfish
BLOWFISH_DIR = $(SRC)/common/crypto/blowfish
BLOWFISH_COMMON_OBJS = blowfish_impl.o
BLOWFISH_COMMON_SRC = $(BLOWFISH_COMMON_OBJS:%.o=$(BLOWFISH_DIR)/%.c)
BLOWFISH_FLAGS = -I$(BLOWFISH_DIR)
# ARCFour
ARCFOUR_DIR = $(SRC)/common/crypto/arcfour
ARCFOUR_COMMON_OBJS = arcfour_crypt.o
ARCFOUR_COMMON_SRC = $(ARCFOUR_COMMON_OBJS:%.o=$(ARCFOUR_DIR)/%.c)
ARCFOUR_FLAGS = -I$(ARCFOUR_DIR)
# DES
DES_DIR = $(SRC)/common/crypto/des
DES_COMMON_OBJS = des_impl.o des_ks.o
DES_COMMON_SRC = $(DES_COMMON_OBJS:%.o=$(DES_DIR)/%.c)
DES_FLAGS = -I$(DES_DIR)
# BIGNUM -- needed by DH, DSA, RSA
BIGNUM_DIR = $(SRC)/common/bignum
BIGNUM_COMMON_OBJS = bignumimpl.o
BIGNUM_COMMON_SRC = $(BIGNUM_COMMON_OBJS:%.o=$(BIGNUM_DIR)/%.c)
BIGNUM_FLAGS = -I$(BIGNUM_DIR)
# Modes
MODES_DIR = $(SRC)/common/crypto/modes
MODES_COMMON_OBJS = modes.o ecb.o cbc.o ctr.o ccm.o gcm.o
MODES_COMMON_SRC = $(MODES_COMMON_OBJS:%.o=$(MODES_DIR)/%.c)
MODES_FLAGS = -I$(MODES_DIR)
# DH
DH_DIR = $(SRC)/common/crypto/dh
DH_COMMON_OBJS = dh_impl.o
DH_COMMON_SRC = $(DH_COMMON_OBJS:%.o=$(DH_DIR)/%.c)
DH_FLAGS = $(BIGNUM_FLAGS) -I$(DH_DIR)
# DSA
DSA_DIR = $(SRC)/common/crypto/dsa
DSA_COMMON_OBJS = dsa_impl.o
DSA_COMMON_SRC = $(DSA_COMMON_OBJS:%.o=$(DSA_DIR)/%.c)
DSA_FLAGS = $(BIGNUM_FLAGS) -I$(DSA_DIR)
# RSA
RSA_DIR = $(SRC)/common/crypto/rsa
RSA_COMMON_OBJS = rsa_impl.o
RSA_COMMON_SRC = $(RSA_COMMON_OBJS:%.o=$(RSA_DIR)/%.c)
RSA_FLAGS = $(BIGNUM_FLAGS) -I$(RSA_DIR)
# PADDING -- needed by RSA
PAD_DIR = $(SRC)/common/crypto/padding
PAD_COMMON_OBJS = pkcs1.o pkcs7.o
PAD_COMMON_SRC = $(PAD_COMMON_OBJS:%.o=$(PAD_DIR)/%.c)
PAD_FLAGS = -I$(PAD_DIR)
# Object setup
AES_OBJS = $(AES_COMMON_OBJS) $(AES_PSM_OBJS)
ARCFOUR_OBJS = $(ARCFOUR_COMMON_OBJS) $(ARCFOUR_PSM_OBJS)
BLOWFISH_OBJS = $(BLOWFISH_COMMON_OBJS) $(BLOWFISH_PSM_OBJS)
DES_OBJS = $(DES_COMMON_OBJS) $(DES_PSM_OBJS)
BIGNUM_OBJS = $(BIGNUM_COMMON_OBJS) $(BIGNUM_PSM_OBJS)
MODES_OBJS = $(MODES_COMMON_OBJS) $(MODES_PSM_OBJS)
DH_OBJS = $(DH_COMMON_OBJS) $(DH_PSM_OBJS)
DSA_OBJS = $(DSA_COMMON_OBJS) $(DSA_PSM_OBJS)
RSA_OBJS = $(RSA_COMMON_OBJS) $(RSA_PSM_OBJS)
PAD_OBJS = $(PAD_COMMON_OBJS) $(PAD_PSM_OBJS)
OBJECTS = $(AES_OBJS) $(ARCFOUR_OBJS) $(BIGNUM_OBJS) \
$(BLOWFISH_OBJS) $(DES_OBJS) $(MODES_OBJS) $(DH_OBJS) \
$(DSA_OBJS) $(RSA_OBJS) $(PAD_OBJS)
# Source file setup
AES_SRC = $(AES_COMMON_SRC) $(AES_PSM_SRC)
ARCFOUR_SRC = $(ARCFOUR_COMMON_SRC) $(ARCFOUR_PSM_SRC)
BLOWFISH_SRC = $(BLOWFISH_COMMON_SRC) $(BLOWFISH_PSM_SRC)
DES_SRC = $(DES_COMMON_SRC) $(DES_PSM_SRC)
BIGNUM_SRC = $(BIGNUM_COMMON_SRC) $(BIGNUM_PSM_SRC)
MODES_SRC = $(MODES_COMMON_SRC) $(MODES_PSM_SRC)
DH_SRC = $(DH_COMMON_SRC) $(DH_PSM_SRC)
DSA_SRC = $(DSA_COMMON_SRC) $(DSA_PSM_SRC)
RSA_SRC = $(RSA_COMMON_SRC) $(RSA_PSM_SRC)
PAD_SRC = $(PAD_COMMON_SRC) $(PAD_PSM_SRC)
# Header include directories
CRYPTODIR = $(SRC)/common/crypto
UTSDIR = $(SRC)/uts/common/
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2017 Jason King.
# Copyright (c) 2018, Joyent, Inc.
#
AES_DIR = $(SRC)/common/crypto/aes
ARCFOUR_DIR = $(SRC)/common/crypto/arcfour
BIGNUM_DIR = $(SRC)/common/bignum
BLOWFISH_DIR = $(SRC)/common/crypto/blowfish
DES_DIR = $(SRC)/common/crypto/des
MODES_DIR = $(SRC)/common/crypto/modes
pics/%.o: $(AES_DIR)/%.c
$(COMPILE.c) $(AES_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(ARCFOUR_DIR)/%.c
$(COMPILE.c) $(ARCFOUR_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(BIGNUM_DIR)/%.c
$(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(BLOWFISH_DIR)/%.c
$(COMPILE.c) $(BLOWFISH_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(DES_DIR)/%.c
$(COMPILE.c) $(DES_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(MODES_DIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(DH_DIR)/%.c
$(COMPILE.c) $(DH_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(DSA_DIR)/%.c
$(COMPILE.c) $(DSA_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(RSA_DIR)/%.c
$(COMPILE.c) $(RSA_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(PAD_DIR)/%.c
$(COMPILE.c) $(PAD_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(SRC_DIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
include $(SRC)/lib/Makefile.targ
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2017 Jason King
# Copyright (c) 2019, Joyent, Inc.
#
LIBRARY = libsoftcrypto.a
VERS = .1
include ../Makefile.com
AES_PSM_OBJS = aes_amd64.o aes_intel.o aeskey.o
ARCFOUR_PSM_OBJS = arcfour-x86_64.o
BIGNUM_PSM_OBJS = bignum_amd64.o bignum_amd64_asm.o
MODES_PSM_OBJS = gcm_intel.o
include $(SRC)/lib/Makefile.lib
include $(SRC)/lib/Makefile.lib.64
CERRWARN += -Wno-type-limits
CERRWARN += -Wno-parentheses
CERRWARN += $(CNOWARN_UNINIT)
# not linted
SMATCH=off
AES_PSM_SRC = $(AES_DIR)/$(MACH64)/aes_amd64.S \
$(AES_DIR)/$(MACH64)/aes_intel.S \
$(AES_DIR)/$(MACH64)/aeskey.c
ARCFOUR_PSM_SRC = arcfour-x86_64.S
BIGNUM_PSM_SRC = $(BIGNUM_DIR)/$(MACH64)/bignum_amd64.c \
$(BIGNUM_DIR)/$(MACH64)/bignum_amd64_asm.S
MODES_PSM_SRC = $(MODES_DIR)/$(MACH64)/gcm_intel.S
# Sources need to be redefined after Makefile.lib inclusion.
SRCS = $(AES_SRC) $(ARCFOUR_SRC) $(BIGNUM_SRC) $(BLOWFISH_SRC) \
$(DES_SRC) $(MODES_SRC) $(DH_SRC) $(DSA_SRC) $(RSA_SRC) \
$(PAD_SRC)
SRCDIR = $(SRC)/lib/pkcs11/libsoftcrypto/common
LIBS = $(DYNLIB)
MAPFILEDIR = ../common
CSTD = $(CSTD_GNU99)
# Hammerhead: Changed from -xO4 (Sun Studio) to -O3 (GCC max optimization)
CFLAGS += -O3
CPPFLAGS += -I$(CRYPTODIR) -I$(UTSDIR) -D_POSIX_PTHREAD_SEMANTICS
ASFLAGS64 += $(AS_PICFLAGS) -D_ASM
BIGNUM_FLAGS += -DPSR_MUL
CLEANFILES += arcfour-x86_64.S arcfour-x86_64.s
LDLIBS += -lcryptoutil -lc
.KEEP_STATE:
all: $(LIBS)
install: all $(ROOTLIBS64) $(ROOTLINKS64)
pics/%.o: $(AES_DIR)/$(MACH64)/%.c
$(COMPILE.c) $(AES_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(AES_DIR)/$(MACH64)/%.S
$(COMPILE.s) $(AES_FLAGS) -o $@ $<
$(POST_PROCESS_S_O)
pics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.c
$(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $<
$(POST_PROCESS_O)
pics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.S
$(COMPILE64.s) $(BIGNUM_FLAGS) -o $@ $<
$(POST_PROCESS_S_O)
pics/%.o: $(MODES_DIR)/$(MACH64)/%.S
$(COMPILE64.s) $(MODES_FLAGS) -o $@ $<
$(POST_PROCESS_S_O)
include ../Makefile.targ
arcfour-x86_64.S: $(ARCFOUR_DIR)/amd64/arcfour-x86_64.pl
$(PERL) $? $@
pics/%.o: arcfour-x86_64.S
$(COMPILE64.s) $(ARCFOUR_FLAGS) -o $@ $<
$(POST_PROCESS_S_O)
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/lib/Makefile.lib
# Each target directory is responsible for making a symbol capabilities object.
# Hammerhead: amd64 only
SUBDIRS = intel
all : TARGET= all
clean : TARGET= clean
clobber : TARGET= clobber
install : TARGET= install
.KEEP_STATE:
.PARALLEL: $(SUBDIRS)
all clean clobber install: \
$(SUBDIRS)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
FRC:
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
include ../../../Makefile.com
MAPFILE-CAP = ../common/mapfile-cap
MAPOPT-CAP = $(MAPFILE-CAP:%=-Wl,-M%)
OBJCAP = pics/objcap.o
SYMCAP = pics/symcap.o
CLOBBERFILES += $(OBJCAP) $(SYMCAP)
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
#
# libsoftcrypto provides two families of optimized functions for SPARC
# platforms, one for sun4u, and one for sun4v. Previous implementations
# provided these families as libsoftcrypto_psr.so.1 libraries, triggered
# by tagging libsoftcrypto.so.1 as an auxiliary filter. These psr filtees
# were installed under /usr/platform/sun4u/lib, and numerous symlinks were
# established to provide the necessary $PLATFORM names, ie:
#
# /usr/platform/SUNW,Ultra-2/lib/libsoftcrypto_psr.so.1 -> ../../../sun4u
# /usr/platform/SUNW,Ultra-4/lib/libsoftcrypto_psr.so.1 -> ../../../sun4u
# ....
#
# and:
#
# /usr/platform/SUNW,Netra-CP3060/lib/libsoftcrypto_psr.so.1 -> ../../sun4v
# /usr/platform/SUNW,Netra-CP3260/lib/libsoftcrypto_psr.so.1 -> ../../sun4v/
# ....
#
# The objects that made up these filtees are now combined into one relocatable
# object, pics/objcap.o, using ../common/mapfile-cap. This mapfile identifies
# the machine hardware name, together with establishing the global symbols that
# should be exported to define each family.
#
# This object capabilities relocatable object is then translated into a symbol
# capabilities relocatable object, pics/symcap.o.
#
# The sun4u and sun4v families of symbol capabilities object are eventually
# included in the final build of libsoftcrypto.so.1.
$(SYMCAP): $(OBJCAP)
$(OBJCAP): $(PICS)
$(PICS): pics
# Combine all pic objects into one relocatable object. Assign any capabilities
# to this object, and define the interface.
pics/objcap.o: $(PICS) $(MAPFILE-CAP)
$(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)
# Convert the combined object capabilities object into a symbol capabilities
# object.
pics/symcap.o: $(OBJCAP)
$(LD) -r -o $@ -z symbolcap $(OBJCAP)
include ../../../Makefile.targ
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
include $(SRC)/lib/Makefile.lib
# Hammerhead: amd64-only
SUBDIRS = $(MACH64)
all : TARGET= all
clean : TARGET= clean
clobber : TARGET= clobber
install : TARGET= install
.KEEP_STATE:
.PARALLEL: $(SUBDIRS)
all clean clobber install: \
$(SUBDIRS)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
FRC:
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# Copyright 2025 Hammerhead Project
#
# Capability object for Intel processors
include $(SRC)/lib/Makefile.lib
MAPFILE = ../common/mapfile-cap
.KEEP_STATE:
all:
clean:
clobber: clean
install: all
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
# The only file that contains capabilities symbols is bignum_i386_asm.o,
# however this is a dependency of bignum_i386.o, which in turn is a dependency
# of pics/bignumimpl.o. Only the last object exports any interfaces, hence
# we compile, and combine all three. The resulting object is identified as a
# whole with the bignum_i386_asm.o capabilities flags.
#
# Note, the Studio assembler identifies bignum_i386_asm.o with its capability
# requirements - SSE2 and MMX. Gnu's assembler does not. These capability
# flags are defined here to ensure either assembler can be used, and a valid
# capabilities object is built for translating to a symbol capabilities object.
$mapfile_version 2
CAPABILITY i386_hwcap1 {
HW += SSE2 MMX;
};
SYMBOL_SCOPE {
global:
big_add;
big_bitlength;
big_cmp_abs;
big_copy;
big_div_pos;
big_ext_gcd_pos;
big_extend;
big_finish;
big_init1;
big_init;
big_modexp;
big_modexp_crt;
big_mul;
big_nextprime_pos;
big_sub;
big_sub_pos;
bignum2bytestring;
local:
*;
};
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2017 Jason King.
# Copyright 2019 Joyent, Inc.
#
#
# MAPFILE HEADER START
#
# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
# Object versioning must comply with the rules detailed in
#
# usr/src/lib/README.mapfiles
#
# You should not be making modifications here until you've read the most current
# copy of that file. If you need help, contact a gatekeeper for guidance.
#
# MAPFILE HEADER END
#
$mapfile_version 2
SYMBOL_VERSION SUNWprivate {
global:
aes_alloc_keysched;
aes_copy_block;
aes_copy_block64;
aes_decrypt_block;
aes_decrypt_contiguous_blocks;
aes_encrypt_block;
aes_encrypt_contiguous_blocks;
aes_init_keysched;
aes_xor_block;
arcfour_crypt;
arcfour_key_init;
$if _ELF64
big_One {
ASSERT = {
TYPE = OBJECT;
SIZE = 24;
};
};
big_Two {
ASSERT = {
TYPE = OBJECT;
SIZE = 24;
};
};
$elif _ELF32
big_One {
ASSERT = {
TYPE = OBJECT;
SIZE = 20;
};
};
big_Two {
ASSERT = {
TYPE = OBJECT;
SIZE = 20;
};
};
$else
$error unknown ELFCLASS
$endif
big_Two;
big_add;
big_bitlength;
big_cmp_abs;
big_copy;
big_div_pos;
big_ext_gcd_pos;
big_extend;
big_finish;
big_init1;
big_init;
big_modexp;
big_modexp_crt;
big_mul;
big_nextprime_pos;
big_random;
big_sub;
big_sub_pos;
bignum2bytestring;
blowfish_alloc_keysched;
blowfish_decrypt_contiguous_blocks;
blowfish_encrypt_contiguous_blocks;
blowfish_init_keysched;
bytestring2bignum;
cbc_alloc_ctx;
cbc_init_ctx;
ccm_alloc_ctx;
ccm_decrypt_final;
ccm_encrypt_final;
ccm_init_ctx;
cmac_alloc_ctx;
cmac_init_ctx;
cmac_mode_final;
ctr_alloc_ctx;
ctr_init_ctx;
des3_crunch_block;
des_alloc_keysched;
des_crunch_block;
des_decrypt_contiguous_blocks;
des_encrypt_contiguous_blocks;
des_init_keysched;
des_keycheck;
dh_genkey_pair;
dh_key_derive;
dsa_genkey_pair;
dsa_sign;
dsa_verify;
ecb_alloc_ctx;
gcm_alloc_ctx;
gcm_decrypt_final;
gcm_encrypt_final;
gcm_init_ctx;
gmac_alloc_ctx;
gmac_init_ctx;
gmac_mode_final;
pkcs1_decode;
pkcs1_encode;
pkcs7_decode;
pkcs7_encode;
rsa_decrypt;
rsa_encrypt;
rsa_genkey_pair;
DEFAULT_PUB_EXPO {
ASSERT = {
TYPE = OBJECT;
SIZE = 3;
};
};
MD5_DER_PREFIX {
ASSERT = {
TYPE = OBJECT;
SIZE = 18;
};
};
SHA1_DER_PREFIX {
ASSERT = {
TYPE = OBJECT;
SIZE = 15;
};
};
SHA1_DER_PREFIX_OID {
ASSERT = {
TYPE = OBJECT;
SIZE = 13;
};
};
SHA256_DER_PREFIX {
ASSERT = {
TYPE = OBJECT;
SIZE = 19;
};
};
SHA384_DER_PREFIX {
ASSERT = {
TYPE = OBJECT;
SIZE = 19;
};
};
SHA512_DER_PREFIX {
ASSERT = {
TYPE = OBJECT;
SIZE = 19;
};
};
local:
*;
};
|