[Object] Support reading 64-bit MIPS ELF archives
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 17 Feb 2015 18:54:22 +0000 (18:54 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 17 Feb 2015 18:54:22 +0000 (18:54 +0000)
commit602706ee583decf5d0f9be3da91ef027201bff16
tree620f9f926c5b0e74b1520ea4b89941769d61095b
parentc4326a1ae45658725e43909b74dc25104994cbb5
[Object] Support reading 64-bit MIPS ELF archives

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:
1. ar_name is equal to "/SYM64/"
2. number of symbols and offsets are 64-bit integers

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
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 `Archive` class code.

http://reviews.llvm.org/D7546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229520 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/Archive.h
lib/Object/Archive.cpp
test/Object/Inputs/archive-test.a-irix6-mips64el [new file with mode: 0644]
test/Object/nm-irix6.test [new file with mode: 0644]