VMS: turn on name mangling for all our programs
authorRichard Levitte <levitte@openssl.org>
Thu, 13 Sep 2018 15:02:53 +0000 (17:02 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 14 Sep 2018 09:00:38 +0000 (11:00 +0200)
With the change to have separate object files by intent, VMS name
mangling gets done differently.  While we previously had that for
libraries only, we must now turn that on generally for our programs,
because some of them depend in internal libraries where mangled names
are all that there is.

Dynamic modules are still built with non-mangled names, which is good
enough to show that it's possible to build with our public libraries
using our public headers.

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

Configurations/10-main.conf
test/cipher_overhead_test.c
test/curve448_internal_test.c
test/ssl_cert_table_internal_test.c
test/tls13encryptiontest.c
test/tls13secretstest.c
test/wpackettest.c
test/x509_internal_test.c

index 5cf345da0af09a9e1721f2cd657432631062c47d..8360bb367173d523c2149e32a744a11dfe243074 100644 (file)
@@ -1732,10 +1732,15 @@ my %targets = (
         lflags           => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",
                                    debug   => "/DEBUG/TRACEBACK",
                                    release => "/NODEBUG/NOTRACEBACK"),
+        # Because of dso_cflags below, we can't set the generic |cflags| here,
+        # as it can't be overriden, so we set separate C flags for libraries
+        # 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"),
-        # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl
-        # for object files belonging to selected internal libraries
-        no_inst_lib_cflags => "",
+        # 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       => "",
         ex_libs          => add(sub { return vms_info()->{zlib} || (); }),
         shared_target    => "vms-shared",
         dso_scheme       => "vms",
index f8c6fd738e56b64fca4d5a27bb25b836aeb4b981..8997fcc5d25be26ee9f18bcf4692a3bed47551a4 100644 (file)
@@ -9,18 +9,8 @@
 
 #include "internal/nelem.h"
 #include "testutil.h"
-
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../ssl/ssl_locl.h"
 
-#ifdef __VMS
-# pragma names restore
-#endif
-
 static int cipher_overhead(void)
 {
     int ret = 1, i, n = ssl3_num_ciphers();
index e7d4378527b1c4ad967727bd7303e1250dc8ec24..f0f10790739c94f238b832220a2417748d244b12 100644 (file)
 #include <string.h>
 #include <openssl/e_os2.h>
 #include <openssl/evp.h>
-
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "curve448_lcl.h"
-
-#ifdef __VMS
-# pragma names restore
-#endif
-
 #include "testutil.h"
 
 static unsigned int max = 1000;
index 2104e8c5163a5d7f281a80bb2c207777c8fda355..bba4e441cbfd19de22e5e9c0d7d27a3a2c95b0cd 100644 (file)
 #include <openssl/ssl.h>
 #include "testutil.h"
 #include "internal/nelem.h"
-
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../ssl/ssl_locl.h"
 #include "../ssl/ssl_cert_table.h"
 
-#ifdef __VMS
-# pragma names restore
-#endif
-
 #define test_cert_table(nid, amask, idx) \
     do_test_cert_table(nid, amask, idx, #idx)
 
index 6f359b3a2f6eb4efd9ae023c2e8cee0b027509ce..f9f61a05a03471148f74f6e0bf3fe3d1dccea279 100644 (file)
@@ -9,19 +9,8 @@
 
 #include <openssl/ssl.h>
 #include <openssl/evp.h>
-
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../ssl/ssl_locl.h"
 #include "../ssl/record/record_locl.h"
-
-#ifdef __VMS
-# pragma names restore
-#endif
-
 #include "internal/nelem.h"
 #include "testutil.h"
 
index 724c170c56b89937b586b5c2c758008ad4fcc9ed..319df17bab06d1f6e2c7502df85b92c5ea19d19e 100644 (file)
 #include <openssl/ssl.h>
 #include <openssl/evp.h>
 
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../ssl/ssl_locl.h"
-
-#ifdef __VMS
-# pragma names restore
-#endif
-
 #include "testutil.h"
 
 #define IVLEN   12
index 773eef052525188b6e3f035ec7a33956b36c5d7c..71eb76346d1f419c84456f9a9db67e3e370ee1fb 100644 (file)
@@ -9,18 +9,7 @@
 
 #include <string.h>
 #include <openssl/buffer.h>
-
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../ssl/packet_locl.h"
-
-#ifdef __VMS
-# pragma names restore
-#endif
-
 #include "testutil.h"
 
 static const unsigned char simple1[] = { 0xff };
index d2f41d708509e1512d7862f4327eb95ecd886c3c..12f6ac95a850249801b2aeac4e1f2aca73589033 100644 (file)
  *
  ***/
 
-#ifdef __VMS
-# pragma names save
-# pragma names as_is,shortened
-#endif
-
 #include "../crypto/x509v3/ext_dat.h"
 #include "../crypto/x509v3/standard_exts.h"
 
-#ifdef __VMS
-# pragma names restore
-#endif
-
 static int test_standard_exts(void)
 {
     size_t i;