0

I have a few dusty old VAX VMS executable files I want to tease apart. I just can't seem to find a decent description of the file format. The best I've got is the "VAX/VMS internals Student Workbook", but I'd like something more authoritative.

2

I found some definitions in freevms-0_3_15.gz, in particular ihddef.h for the header and isddef.h for the sections. There is also some code which uses those structs to parse the executables:

  struct _isd * section=(unsigned long)buffer+ehdr32->ihd$w_size;

  long symtab=0, symtabsize=0, symtabvbn=0, symstr=0, symstrsize=0, symstrvbn=0;

  while (section<(buffer+512*ehdr32->ihd$b_hdrblkcnt)) {
    if (section->isd$w_size==0)
      break;
    if (section->isd$w_size==0xffffffff) {
      int no=((unsigned long)section-(unsigned long)buffer)>>9;
      section=buffer+512*(no+1);
      continue;
    }
    if (debug->ihs$l_dstvbn==section->isd$l_vbn) {
      symtab=section->isd$v_vpn<<12;
      symtabvbn=debug->ihs$l_dstvbn;
      symtabsize=section->isd$w_pagcnt;
    }

    if (debug->ihs$l_dmtvbn==section->isd$l_vbn) {
      symstr=section->isd$v_vpn<<12;
      symstrvbn=debug->ihs$l_dmtvbn;
      symstrsize=section->isd$w_pagcnt;
    }

    section=(unsigned long)section+section->isd$w_size;
  }
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.