From aa7115cfdef1c4641830cee5621d2c919dc417b8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 29 Mar 2017 19:32:17 -0400 Subject: [PATCH] Dump MH_DYLINKER images in upload_system_symbols. Change-Id: I18291efe211f88ae0607a9055d027b520ef13291 Reviewed-on: https://chromium-review.googlesource.com/462676 Reviewed-by: Mark Mentovai --- src/tools/mac/upload_system_symbols/arch_constants.h | 1 + src/tools/mac/upload_system_symbols/arch_reader.go | 7 ++++--- .../mac/upload_system_symbols/upload_system_symbols.go | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tools/mac/upload_system_symbols/arch_constants.h b/src/tools/mac/upload_system_symbols/arch_constants.h index 2115e54e..07b1bc40 100644 --- a/src/tools/mac/upload_system_symbols/arch_constants.h +++ b/src/tools/mac/upload_system_symbols/arch_constants.h @@ -59,3 +59,4 @@ const char* GetNXArchInfoName(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) { const uint32_t kMachHeaderFtypeDylib = MH_DYLIB; const uint32_t kMachHeaderFtypeBundle = MH_BUNDLE; const uint32_t kMachHeaderFtypeExe = MH_EXECUTE; +const uint32_t kMachHeaderFtypeDylinker = MH_DYLINKER; diff --git a/src/tools/mac/upload_system_symbols/arch_reader.go b/src/tools/mac/upload_system_symbols/arch_reader.go index f6064823..0e286dad 100644 --- a/src/tools/mac/upload_system_symbols/arch_reader.go +++ b/src/tools/mac/upload_system_symbols/arch_reader.go @@ -59,7 +59,8 @@ func getArchStringFromHeader(header macho.FileHeader) string { } const ( - MachODylib macho.Type = C.kMachHeaderFtypeDylib - MachOBundle = C.kMachHeaderFtypeBundle - MachOExe = C.kMachHeaderFtypeExe + MachODylib macho.Type = C.kMachHeaderFtypeDylib + MachOBundle = C.kMachHeaderFtypeBundle + MachOExe = C.kMachHeaderFtypeExe + MachODylinker = C.kMachHeaderFtypeDylinker ) diff --git a/src/tools/mac/upload_system_symbols/upload_system_symbols.go b/src/tools/mac/upload_system_symbols/upload_system_symbols.go index 35561208..eab93ed5 100644 --- a/src/tools/mac/upload_system_symbols/upload_system_symbols.go +++ b/src/tools/mac/upload_system_symbols/upload_system_symbols.go @@ -404,7 +404,7 @@ func (fq *findQueue) worker() { } func (fq *findQueue) dumpMachOFile(fp string, image *macho.File) { - if image.Type != MachODylib && image.Type != MachOBundle { + if image.Type != MachODylib && image.Type != MachOBundle && image.Type != MachODylinker { return }