diff options
author | Tim Northover <tnorthover@apple.com> | 2013-06-17 03:03:06 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2013-06-17 03:03:06 +0000 |
commit | 7338de37a802970857079b5a532c5dd50d0a6d5d (patch) | |
tree | 91184bc6eb913ee3e61f8841152a2c95fc5b2a15 /include | |
parent | 0187e7a9ba5c50b4559e0c2e0afceb6d5cd32190 (diff) | |
download | external_llvm-7338de37a802970857079b5a532c5dd50d0a6d5d.zip external_llvm-7338de37a802970857079b5a532c5dd50d0a6d5d.tar.gz external_llvm-7338de37a802970857079b5a532c5dd50d0a6d5d.tar.bz2 |
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.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 2c66941..05c0947 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; |