IBM Support

PH47425: HLASM SUPPORT FOR 64-BIT LINUX WITHOUT COMPATIBILITY LIBRARIES

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • Some small internal changes are needed to enable HLASM to run on
    64-bit Linux without the need for 32-bit compatibility
    libraries, and a new internal 64-bit compatibility interface is
    added.  These changes do not affect the product function on
    other platforms, except that some missing ADATA definitions have
    been added to the ASMADATA macro.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of HLASM for z/OS, z/VM, z/VSE and     *
    *                 Linux                                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: HLASM support for 64-bit Linux without  *
    *                      needing 32-bit compatibility libraries  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Up to now, HLASM for Linux has been built for the 32-bit Linux
    environment (as ELF32 executables) and has relied on using the
    32-bit compatibility C libraries.  These are deprecated and no
    longer supplied as standard, and kernel support for 32-bit
    processes may be withdrawn in future, so HLASM needs to be able
    to run in 64-bit Linux without using these libraries.
    
    During implementation and testing of the required changes
    various other problems were found and addressed:
    
    1.  The listing file on Linux would be more usable if there was
        an option to create it directly as an ASCII text file.
    
    2.  HLASM support for the ASMAOPT options file on Linux had been
        partially coded but did not work (so it was not documented).
    
    3.  On Linux, the result returned by AREAD CLOCKB was incorrect
        because the original implementation was incomplete, and the
        result from AREAD CLOCKD always had zero in the last two
        digits (tenths and hundredths of a second).
    
    4.  The &SYSTEM_ID system variable was blank on Linux.
    
    5.  The Linux interface used printf(string) for error messages,
        which would cause a segmentation fault if the string
        contained text such as "%s" which indicates to printf that a
        substitution value is expected.
    
    6.  HLASM was issuing an MVS DEVTYPE SVC even when running under
        Linux.  This appears to have been harmless but seems unsafe.
    
    7.  Some option flags were missing from the ADATA definitions.
        This is the only issue that affects non-Linux users.
    

Problem conclusion

Temporary fix

Comments

  • From the next RPM (expected to be 54) HLASM for Linux will now
    be supplied as an ELF64 executable (for target system s390x)
    which does not need 32-bit compatibility libraries.
    
    HLASM still runs internally in 31-bit addressing mode, and still
    uses its existing Linux interface which issues 32-bit C library
    calls.  However, when HLASM is built for 64-bit Linux the 32-bit
    library calls are renamed and routed through a new integrated
    compatibility layer which emulates the 32-bit C functions and
    provides 31-bit addressable storage management.  This layer also
    includes a new 64-bit front end which sets up the emulated
    32-bit environment before passing control to the existing 32-bit
    front end.
    
    This means that HLASM can now run natively under 64-bit Linux,
    using 64-bit C libraries and system interfaces.  It no longer
    uses a dynamic library but instead links all relevant modules
    into the main asma90 program.
    
    These changes have been implemented with minimal changes to the
    existing Linux interface and to the platform-independent common
    code, so it is still possible to build the existing version of
    HLASM that requires 32-bit compatibility libraries if necessary.
    However, we are expecting to phase out this possibility at some
    point soon provided that no significant problems are found with
    the new 64-bit interface.
    
    The other problems were addressed as follows:
    
    1.  When HLASM is running on Linux, there is now a new option
        LIST(ASCII) to request that the listing is produced as an
        ASCII text file.  The internal EBCDIC listing is filtered to
        blank out any control codes then translated as from EBCDIC
        code page 37 to ASCII 819, then trailing spaces are removed
        and newline characters are added after each line.
    
    2.  HLASM now supports an ASMAOPT file on Linux. The path to the
        file can be specified using the assembler -A option or using
        the environment variable HLAAOPT=path.
    
    3.  The emulation of the MVS macros TIME DEC and TIME BIN on
        Linux is now done by the 64-bit Linux interface, giving
        accurate results for AREAD CLOCKB and CLOCKD.
    
    4.  The &SYSTEM_ID system variable now contains "Linux" when
        assembling on Linux. It does not currently contain any
        release information. That may change in future, but the plan
        is that it will always start with "Linux" on Linux.
    
    5.  Messages on Linux are now written using printf("%s",string)
        to avoid any problems if the string contains substitution
        sequences.
    
    6.  The DEVTYPE SVC is no longer issued on the Linux path.
    
    7.  The ADATA definitions in ASMADATA have been updated to
        define the new LIST(ASCII) option and some other fields
        which had been deferred or overlooked during previous
        changes:
    
          COMPAT(TRANSDT), TYPECHECK(SIGNED), FLAG(RENT),
          quadword-aligned ESD codes.
    
        For non-Linux users, this is the only external change
        introduced by this APAR.
    
    When a shared library was used, it was technically possible for
    the installation to modify or replace parts such as standard
    translate tables which were part of this library and supplied as
    relocatable ELF32 files to allow relinking.  As these parts are
    now linked into the main module, this is no longer possible
    (except by patching the module).  If the capability to modify
    translate tables or similar parts is required, please request an
    enhancement to the High Level Assembler (HLASM) via the IBM Z
    Software Ideas interface, describing the specific requirement:
    
      https://ibm-z-software-portal.ideas.ibm.com/
    
    DOCUMENTATION UPDATES:
    
    In the HLASM Programmer's Guide, SC26-4941-08, in the appendix
    "High Level Assembler for Linux on z Systems" the following
    changes are made:
    
    In the section "Sources of Assembler Options" the statement "The
    ASMAOPT file is not available" is deleted and the following
    statement is added after the existing statement about the
    default options module:
    
      - An ASMAOPT file may be specified either using the -A option
        on the asma90 command or using the environment variable
        HLAAOPT=file. This can be used to supply default options in
        a specific environment.
    
    An additional option is added to the section "Assembler Options"
    following the documentation of the ELF option.
    
      LIST(ASCII|EBCDIC)
        Linux only option.
    
        If LIST(ASCII) is specified, the listing file is produced as
        an ASCII text file.  The EBCDIC output is filtered to blank
        out any control codes then translated as from EBCDIC code
        page 37 to ASCII 819, then trailing spaces are removed and
        newline characters are added after each line.
    
        The default is LIST(EBCDIC).
    
    In the HLASM Installation and Customization Guide, SC26-3494-05,
    in the chapter "Starting High Level Assembler on Linux for z
    Systems" the following changes are made:
    
    In the asma90 command description, the following option is added
    after the -E option:
    
      -A options_path_name
    
    In the list following "2. The identifiers are:" the same option
    is added as follows:
    
      -A for an input file containing ASMAOPT options
    
    An additional entry is added to the list as follows:
    
    10. An ASMAOPT file may alternatively be specified using an
        environment variable HLAAOPT=options_file_path.
    
    In the following chapter "Usage and limitations of High Level
    Assembler on Linux for z Systems" the following change is made:
    
    1.  The generated listing is in EBCDIC ...
    
    is changed to
    
    1.  If the LIST(ASCII) option is not specified, the generated
        listing is in EBCDIC ...
    
    In the following section "Limitations" the first point is
    replaced with the following:
    
    1.  High Level Assembler for Linux on IBM Z executes in 31-bit
        addressing mode and previously required 32-bit compatibility
        libraries to execute on Linux on IBM Z systems running in
        64-bit addressing mode.  However, HLASM is now provided as
        an ELF64 executable which includes its own 64-bit interface
        layer, so this is no longer required.
    
    END OF DOCUMENTATION UPDATES
    

APAR Information

  • APAR number

    PH47425

  • Reported component name

    HLASM MVS, VM &

  • Reported component ID

    569623400

  • Reported release

    160

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-06-22

  • Closed date

    2022-10-05

  • Last modified date

    2022-11-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UI82710 UI82711 UI82712

Modules/Macros

  •    ASMADATA ASMAINFO ASMA00   ASMA01   ASMA03
    ASMA30   ASMA80   ASMA9Z   ASMA90   ASMA91
    

Publications Referenced
SC26494108SC26349405   

Fix information

  • Fixed component name

    HLASM MVS, VM &

  • Fixed component ID

    569623400

Applicable component levels

  • R160 PSY UI82711

       UP22/10/06 P F210

  • R360 PSY UI82710

       UP22/10/07 P 2210

  • R689 PSY UI82712

       UP22/10/07 I 1000

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSENW6","label":"High Level Assembler and Toolkit Feature"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"160"}]

Document Information

Modified date:
01 November 2022