<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>
    </p>
    <div class="moz-text-html" lang="x-unicode">
      <p><font face="Courier New, Courier, monospace">We use .note
          descriptors with ELF on OpenVMS.  We have self-describing
          entries with tags and lengths.  The compiler encodes stuff for
          the linker such as compiler version, compilation date-time,
          module name, final severity of the compilation, etc.  The
          linker itself then adds/modifies the .note entries to insert
          linker version, link date/time, etc.  We also use .notes to
          record floating point settings used on the compilation (ie,
          VAX float vs IEEE float with denorms vs IEEE float without
          denorms, etc.)  We currently don't have options that impact
          the linker's behavior but that is reasonable.</font></p>
      <p><font face="Courier New, Courier, monospace">I would like to
          see something with tags so that our linker can identify .notes
          that it cares about vs .notes that it should ignore.<br>
        </font></p>
      <p><font face="Courier New, Courier, monospace">For our x86 work,
          we're starting to generate them at the MC boundary so they
          show up both in the ELF and in an .s file.</font></p>
      <p><font face="Courier New, Courier, monospace">What we plan to do
          is to generate module metadata which would then get turned
          into MC calls.<br>
        </font></p>
      <p><font face="Courier New, Courier, monospace">Here's what we
          generate on OpenVMS Itanium (we don't do .s files there)</font></p>
      <p><font face="Courier New, Courier, monospace">Analyze Object
          File                           4-JAN-2018
          11:44:44.78                                                  
          Page 1<br>
          WORK20:[JREAGAN]HW.OBJ;73<br>
          ANALYZ I01-55<br>
          <br>
          This is an OpenVMS IA64 (Elf format) object file<br>
          <br>
          Module Identification Information, in note section 2.<br>
          <br>
              Module name:                                "HW"<br>
              Module version:                             "V1.0"<br>
              Creation date/time:                         " 9-JUN-2017
          10:30"<br>
              Language name:                              "VSI C
          V7.4-001"<br>
          <br>
          Elf Header Information, at file address 0.<br>
          <br>
              Class:                                      ELF-64<br>
              Data:                                       Little-endian
          byte order<br>
              Elf Header Version:                         1.<br>
              OS ABI:                                     OpenVMS<br>
              OS ABI Version:                             2.<br>
              Type:                                       Object<br>
              Machine Architecture:                       IA_64<br>
              Elf File Version:                           1.<br>
              VMS Completion Code:                        SUCCESS<br>
        </font></p>
      <p><font face="Courier New, Courier, monospace">...</font></p>
      <p><font face="Courier New, Courier, monospace">SECTION DATA 2.
          (0002)                       SHDR$K_SHT_NOTE 00000000000000A8
          (168.) bytes<br>
          ".note"<br>
          FileAddr Offset in Section 2. (0002)<br>
          -------- ---------------------------<br>
          000000C0 00000000  Note Entry 0.<br>
          000000C0 00000000    Note Name Size:            
          0000000000000008       8.                             
          nhdr$q_nh_namesz<br>
          000000C8 00000008    Note Descriptor size:      
          000000000000002A      42.                             
          nhdr$q_nh_descsz<br>
          000000D0 00000010    Note Type:                 
          0000000000000001       1. NT_VMS_MHD                  
          nhdr$q_nh_type<br>
          000000D8 00000018    Note Name:                  "IPF/VMS"<br>
          000000E0 00000020    Descriptor:<br>
          000000E0 00000020      Creation Date/Time:       " 9-JUN-2017
          10:30"<br>
          000000F1 00000031      Last Patch Date/Time:     " 9-JUN-2017
          10:30"<br>
          00000102 00000042      Module Name:              "HW"<br>
          00000105 00000045      Module Version:           "V1.0"<br>
          <br>
          00000110 00000050  Note Entry 1.<br>
          00000110 00000050    Note Name Size:            
          0000000000000008       8.                             
          nhdr$q_nh_namesz<br>
          00000118 00000058    Note Descriptor size:      
          000000000000000F      15.                             
          nhdr$q_nh_descsz<br>
          00000120 00000060    Note Type:                 
          0000000000000002       2. NT_VMS_LNM                  
          nhdr$q_nh_type<br>
          00000128 00000068    Note Name:                  "IPF/VMS"<br>
          00000130 00000070    Descriptor:<br>
          00000130 00000070      Language Name:            "VSI C
          V7.4-001"<br>
          <br>
          00000140 00000080  Note Entry 2.<br>
          00000140 00000080    Note Name Size:            
          0000000000000008       8.                             
          nhdr$q_nh_namesz<br>
          00000148 00000088    Note Descriptor size:      
          0000000000000008       8.                             
          nhdr$q_nh_descsz<br>
          00000150 00000090    Note Type:                 
          0000000000000006       6. NT_VMS_FPMODE               
          nhdr$q_nh_type<br>
          00000158 00000098    Note Name:                  "IPF/VMS"<br>
          00000160 000000A0    Descriptor:<br>
          00000160 000000A0      Floating-Point Mode:     
          0000000009800000          IEEE DENORM_RESULTS<br>
        </font></p>
      <p><font face="Courier New, Courier, monospace">On OpenVMS x86,
          here's what we have in our .s files at the moment (subject to
          change)</font></p>
      <p><font face="Courier New, Courier, monospace">       
          .section        .note,"",@note<br>
                  .quad   8<br>
                  .quad   44<br>
                  .quad   1<br>
                  .ascii  "IPF/VMS"<br>
                  .byte   0<br>
                  .ascii  " 4-JAN-2018 11:49"<br>
                  .ascii  " 4-JAN-2018 11:49"<br>
                  .ascii  ".MAIN."<br>
                  .byte   0<br>
                  .ascii  "V1"<br>
                  .byte   0<br>
                  .align  8<br>
                  .quad   8<br>
                  .quad   14<br>
                  .quad   2<br>
                  .ascii  "IPF/VMS"<br>
                  .byte   0<br>
                  .ascii  "XMAC X6.0-004"<br>
                  .byte   0<br>
                  .align  8<br>
        </font><br>
      </p>
    </div>
  </body>
</html>