summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-06-17 03:03:06 +0000
committerTim Northover <tnorthover@apple.com>2013-06-17 03:03:06 +0000
commit7338de37a802970857079b5a532c5dd50d0a6d5d (patch)
tree91184bc6eb913ee3e61f8841152a2c95fc5b2a15 /include
parent0187e7a9ba5c50b4559e0c2e0afceb6d5cd32190 (diff)
downloadllvm-7338de37a802970857079b5a532c5dd50d0a6d5d.tar.gz
llvm-7338de37a802970857079b5a532c5dd50d0a6d5d.tar.bz2
llvm-7338de37a802970857079b5a532c5dd50d0a6d5d.tar.xz
AArch64: print relocation addends if present on AArch64
llvm-objdump should provide some way of printing out the addends present in the .rela sections for debugging purposes if nothing else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Object/ELF.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h
index 2c66941bc4..05c0947d69 100644
--- a/include/llvm/Object/ELF.h
+++ b/include/llvm/Object/ELF.h
@@ -2270,7 +2270,16 @@ error_code ELFObjectFile<ELFT>::getRelocationValueString(
res = "Unknown";
}
break;
- case ELF::EM_AARCH64:
+ case ELF::EM_AARCH64: {
+ std::string fmtbuf;
+ raw_string_ostream fmt(fmtbuf);
+ fmt << symname;
+ if (addend != 0)
+ fmt << (addend < 0 ? "" : "+") << addend;
+ fmt.flush();
+ Result.append(fmtbuf.begin(), fmtbuf.end());
+ break;
+ }
case ELF::EM_ARM:
case ELF::EM_HEXAGON:
res = symname;