From 806f00649090e81ed478441e3edcddaef1176ee0 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 5 Jun 2013 01:33:53 +0000 Subject: Handle relocations that don't point to symbols. In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284 --- llvm/lib/Object/Object.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'llvm/lib/Object/Object.cpp') diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp index 3e2c78e..6941708 100644 --- a/llvm/lib/Object/Object.cpp +++ b/llvm/lib/Object/Object.cpp @@ -219,10 +219,7 @@ uint64_t LLVMGetRelocationOffset(LLVMRelocationIteratorRef RI) { } LLVMSymbolIteratorRef LLVMGetRelocationSymbol(LLVMRelocationIteratorRef RI) { - SymbolRef ret; - if (error_code ec = (*unwrap(RI))->getSymbol(ret)) - report_fatal_error(ec.message()); - + symbol_iterator ret = (*unwrap(RI))->getSymbol(); return wrap(new symbol_iterator(ret)); } -- cgit v1.1