VMS need to build DSO with name shortening, because of provider code
authorRichard Levitte <levitte@openssl.org>
Mon, 17 May 2021 21:40:32 +0000 (23:40 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 19 May 2021 10:31:34 +0000 (12:31 +0200)
We have pretty long symbol names, so they need to be shortened to fit
in the linker's 31 character limit on symbols.

Symbol name shortening with the VMS C compiler works in such a way
that a symbol name that's longer than 31 characters is mangled into
its first original 22 characters, followed by a dollar sign and the
32-bit CRC of the original symbol name in hexadecimal.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15317)

Configurations/10-main.conf

index b7c9565b38a73027a7134ef8b0aa62bda8d1aabd..122d3f46db8e193ab427a25ae5abd9461724b615 100644 (file)
@@ -1837,10 +1837,12 @@ my %targets = (
         # and binaries instead.
         bin_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
         lib_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
-        # For modules specifically, we assume that they only use public
-        # OpenSSL symbols, and therefore don't need to mangle names on
-        # their own.
-        dso_cflags       => "",
+        # Strictly speaking, DSOs should not need to have name shortening,
+        # as all their exported symbols should be short enough to fit the
+        # linker's 31 character per symbol name limit.  However, providers
+        # may be composed of more than one object file, and internal symbols
+        # may and do surpass the 31 character limit.
+        dso_cflags       => add("/NAMES=(SHORTENED)"),
         ex_libs          => add(sub { return vms_info()->{zlib} || (); }),
         shared_target    => "vms-shared",
         # def_flag made to empty string so a .opt file gets generated