From 1d902b7cc7cfc2f08cd6ba52acd1cd44ac291b93 Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Tue, 17 Feb 2015 18:54:22 +0000 Subject: [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 llvm-svn: 229520 --- .../Object/Inputs/archive-test.a-irix6-mips64el | Bin 0 -> 6608 bytes llvm/test/Object/nm-irix6.test | 27 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 llvm/test/Object/Inputs/archive-test.a-irix6-mips64el create mode 100644 llvm/test/Object/nm-irix6.test (limited to 'llvm/test/Object') diff --git a/llvm/test/Object/Inputs/archive-test.a-irix6-mips64el b/llvm/test/Object/Inputs/archive-test.a-irix6-mips64el new file mode 100644 index 00000000000..ccc2634be7a Binary files /dev/null and b/llvm/test/Object/Inputs/archive-test.a-irix6-mips64el differ diff --git a/llvm/test/Object/nm-irix6.test b/llvm/test/Object/nm-irix6.test new file mode 100644 index 00000000000..047665cbf32 --- /dev/null +++ b/llvm/test/Object/nm-irix6.test @@ -0,0 +1,27 @@ +# Check reading IRIX 6.0 64-bit archive file. +RUN: llvm-nm %p/Inputs/archive-test.a-irix6-mips64el | FileCheck %s + +CHECK: f1.o: +CHECK-NEXT: 00000028 T f1 +CHECK-NEXT: 00000000 d s_d +CHECK-NEXT: 00000000 t s_foo + +CHECK: f2.o: +CHECK-NEXT: 00000028 T f2 +CHECK-NEXT: 00000000 d s_d +CHECK-NEXT: 00000000 t s_foo + +CHECK: f3.o: +CHECK-NEXT: 00000028 T f3 +CHECK-NEXT: 00000000 d s_d +CHECK-NEXT: 00000000 t s_foo + +CHECK: f4.o: +CHECK-NEXT: 00000028 T f4 +CHECK-NEXT: 00000000 d s_d +CHECK-NEXT: 00000000 t s_foo + +CHECK: f5.o: +CHECK-NEXT: 00000028 T f5 +CHECK-NEXT: 00000000 d s_d +CHECK-NEXT: 00000000 t s_foo -- cgit v1.2.3