aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/obj2yaml/elf2yaml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/obj2yaml/elf2yaml.cpp')
-rw-r--r--llvm/tools/obj2yaml/elf2yaml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp
index 53455b8..ab15553 100644
--- a/llvm/tools/obj2yaml/elf2yaml.cpp
+++ b/llvm/tools/obj2yaml/elf2yaml.cpp
@@ -281,7 +281,8 @@ template <class ELFT> Expected<ELFYAML::Object *> ELFDumper<ELFT>::dump() {
Y->Header.Type = Obj.getHeader().e_type;
if (Obj.getHeader().e_machine != 0)
Y->Header.Machine = ELFYAML::ELF_EM(Obj.getHeader().e_machine);
- Y->Header.Flags = Obj.getHeader().e_flags;
+ if (Obj.getHeader().e_flags != 0)
+ Y->Header.Flags = ELFYAML::ELF_EF(Obj.getHeader().e_flags);
Y->Header.Entry = Obj.getHeader().e_entry;
// Dump sections