Browse Source

VMS: be less picky when loading DSOs

The DSO API was picky about casing of symbol names on VMS.

There's really no reason to be that picky, it's mostly just annoying.
Therefore, we take away the possibility to flag for a choice, and will
instead first try to find a symbol with exact case, and failing that,
we try to find it in upper case.

Reviewed-by: Rich Salz <rsalz@openssl.org>
master
Richard Levitte 6 years ago
parent
commit
278a33da3c
2 changed files with 7 additions and 15 deletions
  1. +7
    -9
      crypto/dso/dso_vms.c
  2. +0
    -6
      include/internal/dso.h

+ 7
- 9
crypto/dso/dso_vms.c View File

@ -261,15 +261,13 @@ static int do_find_symbol(DSO_VMS_INTERNAL *ptr,
symname_dsc, sym, 0, flags);
}
# ifndef LIB$M_FIS_MIXEDCASE
# define LIB$M_FIS_MIXEDCASE (1 << 4);
# endif
void vms_bind_sym(DSO *dso, const char *symname, void **sym)
{
DSO_VMS_INTERNAL *ptr;
int status;
# ifdef LIB$M_FIS_MIXEDCASE
int flags = LIB$M_FIS_MIXEDCASE;
# else
int flags = (1 << 4);
# endif
int status = 0;
struct dsc$descriptor_s symname_dsc;
/* Arrange 32-bit pointer to (copied) string storage, if needed. */
@ -312,10 +310,10 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym)
return;
}
if (dso->flags & DSO_FLAG_UPCASE_SYMBOL)
flags = 0;
status = do_find_symbol(ptr, &symname_dsc, sym, LIB$M_FIS_MIXEDCASE);
status = do_find_symbol(ptr, &symname_dsc, sym, flags);
if (!$VMS_STATUS_SUCCESS(status))
status = do_find_symbol(ptr, &symname_dsc, sym, 0);
if (!$VMS_STATUS_SUCCESS(status)) {
unsigned short length;


+ 0
- 6
include/internal/dso.h View File

@ -42,12 +42,6 @@ extern "C" {
*/
# define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
/*
* The following flag controls the translation of symbol names to upper case.
* This is currently only being implemented for OpenVMS.
*/
# define DSO_FLAG_UPCASE_SYMBOL 0x10
/*
* This flag loads the library with public symbols. Meaning: The exported
* symbols of this library are public to all libraries loaded after this


Loading…
Cancel
Save