This is an archive of the discontinued LLVM Phabricator instance.

[Object] Support reading 64-bit MIPS ELF archives
ClosedPublic

Authored by atanasyan on Feb 10 2015, 2:23 PM.

Details

Summary

The 64-bit MIPS ELF archive file format is used by MIPS64 targets. The main difference from a regular archive file is the symbol table format:

  • ar_name is equal to "/SYM64/"
  • number of symbols and offsets are 64-bit integers

64-bit ELF Object File Specification. Page 96

The patch allows reading of such archive files by llvm-nm, llvm-objdump and other tools. But it does not support archive files with number of symbols and/or offsets exceed 2^32. I think it is a rather rare case requires more significant modification of the Archive class code.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan updated this revision to Diff 19707.Feb 10 2015, 2:23 PM
atanasyan retitled this revision from to [Object] Support reading 64-bit MIPS ELF archives.
atanasyan updated this object.
atanasyan edited the test plan for this revision. (Show Details)
atanasyan added a reviewer: rafael.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a subscriber: Unknown Object (MLST).

Can we also add a pointer to the specification in the code. It would be helpful for others if they happen to change this same code later.

Otherwise LGTM.

include/llvm/Object/Archive.h
181

Should this be K_MIPS64 ?

Thanks for review. The patch committed at rL229520.

atanasyan accepted this revision.Feb 3 2016, 12:33 AM
atanasyan added a reviewer: atanasyan.
This revision is now accepted and ready to land.Feb 3 2016, 12:33 AM
atanasyan closed this revision.Feb 3 2016, 12:33 AM