This is an archive of the discontinued LLVM Phabricator instance.

Object: add IMAGE_FILE_MACHINE_ARM64
ClosedPublic

Authored by martell on Jul 26 2015, 7:52 AM.

Details

Summary

Object: add IMAGE_FILE_MACHINE_ARM64

The official specifications state that the value of ARM64 to be 0xAA64
(as per the Microsoft Portable Executable and Common Object Format Specification v8.3).

Diff Detail

Repository
rL LLVM

Event Timeline

martell updated this revision to Diff 30655.Jul 26 2015, 7:52 AM
martell retitled this revision from to Object: add IMAGE_FILE_MACHINE_ARM64.
martell updated this object.
martell added a reviewer: rnk.
martell set the repository for this revision to rL LLVM.
martell added subscribers: llvm-commits, ruiu, compnerd.

It would be nice to add a is64Bit(COFF::MachineTypes) method to COFFObjectFile.h and use it to implement COFFParser::is64Bit and COFFObjectFile::getBytesInAddress.

It would be nice to add a is64Bit(COFF::MachineTypes) method to COFFObjectFile.h and use it to implement COFFParser::is64Bit and COFFObjectFile::getBytesInAddress.

Yes I agree that would make sense, I would however like to create that change in a separate differential rather than combining them

rnk accepted this revision.Jul 27 2015, 3:33 PM
rnk edited edge metadata.

Seems like a reasonable test commit

This revision is now accepted and ready to land.Jul 27 2015, 3:33 PM

The change seems fine, but Im not sure what the point of this is. Microsoft has not yet fully provided AArch64 support. This means that anything that we do will be purely speculative.

This revision was automatically updated to reflect the committed changes.

The change seems fine, but Im not sure what the point of this is.

Originally this was just going to be a test commit.

Microsoft has not yet fully provided AArch64 support. This means that anything that we do will be purely speculative.

Yes this is true but we can add support for it in objdump and readobj so that llvm can at least recognize import library files.
End users have a habit of mistakenly using i686 libraries with x86_64 and I feel they will do the same with aarch64 and arm once it is released.
It might be useful to lld if we want to print out a decent error message when they do this.