summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/symbols/Makefile4
-rw-r--r--src/regress/lib/libcrypto/symbols/symbols.awk8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/symbols/Makefile b/src/regress/lib/libcrypto/symbols/Makefile
index 7b703bbf9e..07cce7e904 100644
--- a/src/regress/lib/libcrypto/symbols/Makefile
+++ b/src/regress/lib/libcrypto/symbols/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.4 2023/06/22 19:23:27 tb Exp $ 1# $OpenBSD: Makefile,v 1.5 2024/07/10 13:11:22 tb Exp $
2 2
3TESTS = \ 3TESTS = \
4 symbols 4 symbols
@@ -22,7 +22,7 @@ LDADD= -lcrypto
22DPADD= ${LIBCRYPTO} 22DPADD= ${LIBCRYPTO}
23LDFLAGS+= -lcrypto 23LDFLAGS+= -lcrypto
24LDFLAGS+= -Wl,--no-allow-shlib-undefined 24LDFLAGS+= -Wl,--no-allow-shlib-undefined
25CFLAGS+= -Wno-deprecated-declarations 25CFLAGS+= -Wno-deprecated-declarations -DUSE_LIBRESSL_NAMESPACE
26 26
27CLEANFILES+= include_headers.c symbols.c symbols.c.tmp 27CLEANFILES+= include_headers.c symbols.c symbols.c.tmp
28 28
diff --git a/src/regress/lib/libcrypto/symbols/symbols.awk b/src/regress/lib/libcrypto/symbols/symbols.awk
index dec111b0b8..c9a7266001 100644
--- a/src/regress/lib/libcrypto/symbols/symbols.awk
+++ b/src/regress/lib/libcrypto/symbols/symbols.awk
@@ -1,4 +1,4 @@
1# $OpenBSD: symbols.awk,v 1.11 2024/04/15 16:49:13 tb Exp $ 1# $OpenBSD: symbols.awk,v 1.12 2024/07/10 13:11:22 tb Exp $
2 2
3# Copyright (c) 2018,2020 Theo Buehler <tb@openbsd.org> 3# Copyright (c) 2018,2020 Theo Buehler <tb@openbsd.org>
4# 4#
@@ -32,6 +32,8 @@ BEGIN {
32 32
33 # Undefine aliases, so we don't accidentally leave them in Symbols.list. 33 # Undefine aliases, so we don't accidentally leave them in Symbols.list.
34 printf("#ifdef %s\n#undef %s\n#endif\n", $0, $0) 34 printf("#ifdef %s\n#undef %s\n#endif\n", $0, $0)
35
36 printf("static typeof(%s) *_libre_%s;\n", $0, $0);
35} 37}
36 38
37END { 39END {
@@ -41,12 +43,16 @@ END {
41 printf("\tstruct {\n") 43 printf("\tstruct {\n")
42 printf("\t\tconst char *const name;\n") 44 printf("\t\tconst char *const name;\n")
43 printf("\t\tconst void *addr;\n") 45 printf("\t\tconst void *addr;\n")
46 printf("\t\tconst void *libre_addr;\n")
44 printf("\t} symbols[] = {\n") 47 printf("\t} symbols[] = {\n")
45 48
46 for (symbol in symbols) { 49 for (symbol in symbols) {
47 printf("\t\t{\n") 50 printf("\t\t{\n")
48 printf("\t\t\t.name = \"%s\",\n", symbol) 51 printf("\t\t\t.name = \"%s\",\n", symbol)
49 printf("\t\t\t.addr = &%s,\n", symbol) 52 printf("\t\t\t.addr = &%s,\n", symbol)
53 printf("#if defined(USE_LIBRESSL_NAMESPACE)\n")
54 printf("\t\t\t.libre_addr = &_libre_%s,\n", symbol)
55 printf("#endif\n")
50 printf("\t\t},\n") 56 printf("\t\t},\n")
51 } 57 }
52 58