[Info-vax] ELF images on X86

John Reagan xyzzy1959 at gmail.com
Wed Mar 31 22:01:10 EDT 2021


On Wednesday, March 31, 2021 at 4:45:38 PM UTC-4, osuv... at gmail.com wrote:
> On Wednesday, March 31, 2021 at 3:13:18 PM UTC-4, xyzz... at gmail.com wrote: 
> > This is an OpenVMS X86-64 (Elf format) executable image file
> > Magic: (7F 45 4C 46) 
> > Class: 64-bit (0x2) 
> > DataEncoding: LittleEndian (0x1) 
> > FileVersion: 1 
> > OS/ABI: OpenVMS (0xD) 
> > ABIVersion: 2 
> > Unused: (00 00 00 00 00 00 00) 
> > } 
> > Type: Executable (0x2) 
> > Machine: EM_X86_64 (0x3E) 
> > Version: 1
> 0x3E = 62 
> 
> The VSI C compiler I'm using (or rather sys$startlet_c(elfdef) from 2017) doesn't 
> seem to define a EHDR$K_EM_X86_64 macro to go along with the 
> EHDR$K_EM_IA_64 macro. 
> 
> I have a program that scans a directory of shareable images to see which ones 
> define a particular symbol in their symbol vector. I want it to deal gracefully 
> with all files it may encounter in a mixed-architecture cluster. 
> 
> >>Dave
The older Itanium verion of elfdef is a pruned down version which only has the Itanium pieces.
The one on the cross-tools kit and on OpenVMS x86 has more.
$ search XFWY_RESD$:[STARLET_H.OBJ]ELFDEF.H ehdr$k_e
#define EHDR$K_EM_NONE 0
#define EHDR$K_EM_IA_64 50
#define EHDR$K_EM_X86_64 62

<I was going to add EM_ARM, EM_AARCH64, EM_PPC64, and even EM_VAX for 1-Apr>




More information about the Info-vax mailing list