From eb919477090f814df0b2c14c1e9aa27d6fc715b9 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Wed, 25 Jan 2017 20:47:17 +0000 Subject: [PATCH] [AMDGPU] Bump up n_type for metadata v2 Differential Revision: https://reviews.llvm.org/D29115 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293083 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/AMDGPUPTNote.h | 5 ++++- tools/llvm-readobj/ELFDumper.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Target/AMDGPU/AMDGPUPTNote.h b/lib/Target/AMDGPU/AMDGPUPTNote.h index 947d45b6696..05df863e7f7 100644 --- a/lib/Target/AMDGPU/AMDGPUPTNote.h +++ b/lib/Target/AMDGPU/AMDGPUPTNote.h @@ -25,6 +25,7 @@ const char SectionName[] = ".note"; const char NoteName[] = "AMD"; +// TODO: Move this enum to include/llvm/Support so it can be used in tools? enum NoteType{ NT_AMDGPU_HSA_CODE_OBJECT_VERSION = 1, NT_AMDGPU_HSA_HSAIL = 2, @@ -32,7 +33,9 @@ enum NoteType{ NT_AMDGPU_HSA_PRODUCER = 4, NT_AMDGPU_HSA_PRODUCER_OPTIONS = 5, NT_AMDGPU_HSA_EXTENSION = 6, - NT_AMDGPU_HSA_RUNTIME_METADATA = 7, + NT_AMDGPU_HSA_RUNTIME_METADATA_V_1 = 7, // deprecated since 12/14/16. + NT_AMDGPU_HSA_RUNTIME_METADATA_V_2 = 8, + NT_AMDGPU_HSA_RUNTIME_METADATA = NT_AMDGPU_HSA_RUNTIME_METADATA_V_2, NT_AMDGPU_HSA_HLDEBUG_DEBUG = 101, NT_AMDGPU_HSA_HLDEBUG_TARGET = 102 }; diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 0a3cd7a4f62..eda3390b0f5 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -2364,7 +2364,7 @@ template void ELFDumper::printAMDGPURuntimeMD() { } ArrayRef Sec = unwrapOrError(Obj->getSectionContents(Shdr)); - const uint32_t RuntimeMDNoteType = 7; + const uint32_t RuntimeMDNoteType = 8; for (auto I = reinterpret_cast(&Sec[0]), E = I + Sec.size()/4; I != E;) { uint32_t NameSZ = I[0];