Skip to content

Commit ec22592

Browse files
committed
[MachO] Share creation of types used in Mach-O headers between Mach-O View, shared cache, and kernel cache
1 parent 1431470 commit ec22592

File tree

15 files changed

+2001
-2947
lines changed

15 files changed

+2001
-2947
lines changed

macho/types.cpp

Lines changed: 571 additions & 0 deletions
Large diffs are not rendered by default.

macho/types.h

Lines changed: 1408 additions & 0 deletions
Large diffs are not rendered by default.

view/kernelcache/api/kernelcacheapi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <binaryninjaapi.h>
44
#include "../core/MetadataSerializable.hpp"
5-
#include "../api/view/macho/machoview.h"
5+
#include "macho/types.h"
66
#include "kernelcachecore.h"
77

88
using namespace BinaryNinja;

view/kernelcache/core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ file (GLOB_RECURSE COMMON_SOURCES CONFIGURE_DEPENDS
1414
*.hpp
1515
*.c
1616
*.cpp
17+
../../../macho/*
1718
)
1819

1920
set(SOURCES ${COMMON_SOURCES})

view/kernelcache/core/KCView.cpp

Lines changed: 3 additions & 537 deletions
Large diffs are not rendered by default.

view/kernelcache/core/KernelCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <binaryninjaapi.h>
66
#include "KCView.h"
7-
#include "view/macho/machoview.h"
7+
#include "macho/types.h"
88
#include "MetadataSerializable.hpp"
99
#include "../api/kernelcachecore.h"
1010

view/kernelcache/core/MetadataSerializable.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "rapidjson/stringbuffer.h"
4444
#include "rapidjson/prettywriter.h"
4545
#include "../api/kernelcachecore.h"
46-
#include "view/macho/machoview.h"
46+
#include "macho/types.h"
4747

4848
using namespace BinaryNinja;
4949

view/macho/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(NOT BN_INTERNAL_BUILD)
66
add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api)
77
endif()
88

9-
file(GLOB SOURCES *.cpp *.h ../../objectivec/*)
9+
file(GLOB SOURCES *.cpp *.h ../../objectivec/* ../../macho/*)
1010

1111
if(DEMO)
1212
add_library(view_macho STATIC ${SOURCES})

view/macho/machoview.cpp

Lines changed: 4 additions & 511 deletions
Large diffs are not rendered by default.

view/macho/machoview.h

Lines changed: 3 additions & 1369 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)