Skip to content

Instantly share code, notes, and snippets.

@edmcman
Last active March 25, 2024 14:51
Show Gist options
  • Save edmcman/8c71ec9fba34faf495cfc366eb5b833d to your computer and use it in GitHub Desktop.
Save edmcman/8c71ec9fba34faf495cfc366eb5b833d to your computer and use it in GitHub Desktop.

oo.gcc-oo.clang Diff

TOC

Visual Chart Diff

flowchart LR

frame_dummy-0-old<--Match 67%-->frame_dummy-0-new
Cls3func1-1-old<--Match 95%-->Cls3func1-1-new
Cls2func4-1-old<--Match 95%-->Cls2func4-1-new
myfunc-0-old<--Match 46%-->myfunc-0-new
Cls3func3-1-old<--Match 95%-->Cls3func3-1-new
__do_global_dtors_aux-0-old<--Match 95%-->__do_global_dtors_aux-0-new
Cls3func3-1-old<--Match 95%-->_ZThn16_N4Cls35func3Ev-1-new

subgraph oo.clang
    frame_dummy-0-new
Cls3func1-1-new
Cls2func4-1-new
myfunc-0-new
Cls3func3-1-new
__do_global_dtors_aux-0-new
_ZThn16_N4Cls35func3Ev-1-new
    subgraph Added
direction LR
EXTERNAL-__gxx_personality_v0
end
end

subgraph oo.gcc
    frame_dummy-0-old
Cls3func1-1-old
Cls2func4-1-old
myfunc-0-old
Cls3func3-1-old
__do_global_dtors_aux-0-old
Cls3func3-1-old
    subgraph Deleted
direction LR
Cls1-func1
end
end

Loading
pie showData
    title Function Matches - 98.1651%
"unmatched_funcs_len" : 2
"matched_funcs_len" : 107
Loading
pie showData
    title Matched Function Similarity - 90.6542%
"matched_funcs_with_code_changes_len" : 7
"matched_funcs_with_non_code_changes_len" : 3
"matched_funcs_no_changes_len" : 97
Loading

Metadata

Ghidra Diff Engine

Command Line

Captured Command Line

ghidriff --project-location ghidra_projects --project-name ghidriff --symbols-path symbols --threaded --log-level INFO --file-log-level INFO --log-path ghidriff.log --min-func-len 10 --bsim --max-ram-percent 60.0 --max-section-funcs 200 oo.gcc oo.clang

Verbose Args

--old ['./oo.gcc'] --new [['./oo.clang']] --engine VersionTrackingDiff --output-path ghidriffs --summary False --project-location ghidra_projects --project-name ghidriff --symbols-path symbols --threaded True --force-analysis False --force-diff False --no-symbols False --log-level INFO --file-log-level INFO --log-path ghidriff.log --va False --min-func-len 10 --use-calling-counts False --bsim True --bsim-full False --max-ram-percent 60.0 --print-flags False --jvm-args None --side-by-side False --max-section-funcs 200 --md-title None

Binary Metadata Diff

--- oo.gcc Meta
+++ oo.clang Meta
@@ -1,43 +1,44 @@
-Program Name: oo.gcc
+Program Name: oo.clang
 Language ID: x86:LE:64:default (3.0)
 Compiler ID: gcc
 Processor: x86
 Endian: Little
 Address Size: 64
 Minimum Address: 00400000
 Maximum Address: _elfSectionHeaders::0000093f
-# of Bytes: 48552
+# of Bytes: 32316
 # of Memory Blocks: 39
-# of Instructions: 509
-# of Defined Data: 314
-# of Functions: 55
-# of Symbols: 178
-# of Data Types: 217
-# of Data Type Categories: 43
+# of Instructions: 319
+# of Defined Data: 290
+# of Functions: 54
+# of Symbols: 163
+# of Data Types: 198
+# of Data Type Categories: 33
 Analyzed: true
 Created With Ghidra Version: 11.0.1
 DWARF Loaded: true
-Date Created: Mon Mar 25 10:50:02 EDT 2024
+Date Created: Mon Mar 25 10:50:03 EDT 2024
 ELF File Type: executable
-ELF Note[GNU BuildId]: 4d12649b76b3f58c668e541b2b43bd5db95bfc2b
+ELF Note[GNU BuildId]: 89753f5bdf2cbe1d8e9ea8ef276c22988c30bfc0
 ELF Note[required kernel ABI]: Linux 2.6.32
 ELF Original Image Base: 0x400000
 ELF Prelinked: false
 ELF Source File [   0]: oo.cpp
 ELF Source File [   1]: crtstuff.c
 ELF Source File [   2]: crtstuff.c
 ELF Source File [   3]: 
 Elf Comment[0]: GCC: (GNU) 4.8.5 20150623 (Red Hat 4.8.5-44)
-Elf Comment[1]: GCC: (GNU) 11.2.1 20220127 (Red Hat 11.2.1-9)
+Elf Comment[1]: GCC: (GNU) 8.3.1 20190311 (Red Hat 8.3.1-3)
+Elf Comment[2]: clang version 9.0.1 (Red Hat 9.0.1-1.el7)
 Executable Format: Executable and Linking Format (ELF)
-Executable Location: /Users/eschwartz/fuzzyhash-test/exp1/oo.gcc
-Executable MD5: d0ff2abed10c4904f24ed484f7a463e9
-Executable SHA256: 314edbbd5cc80ec295625ce2e920fcf9323c5dc5cf684591f717d880be656906
-FSRL: file:///Users/eschwartz/fuzzyhash-test/exp1/oo.gcc?MD5=d0ff2abed10c4904f24ed484f7a463e9
+Executable Location: /Users/eschwartz/fuzzyhash-test/exp1/oo.clang
+Executable MD5: 8107980521f217a0087090c71b3d1ee7
+Executable SHA256: 312cb64a58556381b8dec0908a2d620fd0446409899bdd9a5484d6509471825f
+FSRL: file:///Users/eschwartz/fuzzyhash-test/exp1/oo.clang?MD5=8107980521f217a0087090c71b3d1ee7
 Preferred Root Namespace Category: 
 Relocatable: false
 Required Library [    0]: libstdc++.so.6
 Required Library [    1]: libm.so.6
 Required Library [    2]: libgcc_s.so.1
 Required Library [    3]: libc.so.6
 Should Ask To Analyze: false

Program Options

Ghidra oo.gcc Decompiler Options
Decompiler Option Value
Prototype Evaluation __stdcall
Ghidra oo.gcc Specification extensions Options
Specification extensions Option Value
FormatVersion 0
VersionCounter 0
Ghidra oo.gcc Analyzers Options
Analyzers Option Value
ASCII Strings true
ASCII Strings.Create Strings Containing Existing Strings true
ASCII Strings.Create Strings Containing References true
ASCII Strings.Force Model Reload false
ASCII Strings.Minimum String Length LEN_5
ASCII Strings.Model File StringModel.sng
ASCII Strings.Require Null Termination for String true
ASCII Strings.Search Only in Accessible Memory Blocks true
ASCII Strings.String Start Alignment ALIGN_1
ASCII Strings.String end alignment 4
Aggressive Instruction Finder false
Aggressive Instruction Finder.Create Analysis Bookmarks true
Apply Data Archives true
Apply Data Archives.Archive Chooser [Auto-Detect]
Apply Data Archives.Create Analysis Bookmarks true
Apply Data Archives.GDT User File Archive Path None
Apply Data Archives.User Project Archive Path None
CERT Classic Function Hashing Classic false
CERT Classic Function Hashing Classic.Include Basic Blocks false
CERT Classic Function Hashing Classic.Logging Level WARN
CERT Classic Function Hashing Classic.Minimum Instruction Count 1
Call Convention ID true
Call Convention ID.Analysis Decompiler Timeout (sec) 60
Call-Fixup Installer true
Condense Filler Bytes false
Condense Filler Bytes.Filler Value Auto
Condense Filler Bytes.Minimum number of sequential bytes 1
Create Address Tables true
Create Address Tables.Allow Offcut References false
Create Address Tables.Auto Label Table false
Create Address Tables.Create Analysis Bookmarks true
Create Address Tables.Maxmimum Pointer Distance 16777215
Create Address Tables.Minimum Pointer Address 4132
Create Address Tables.Minimum Table Size 2
Create Address Tables.Pointer Alignment 1
Create Address Tables.Relocation Table Guide true
Create Address Tables.Table Alignment 4
DWARF true
DWARF Line Number false
DWARF.Add Inlined Functions Comments false
DWARF.Add Lexical Block Comments false
DWARF.Create Function Signatures true
DWARF.Debug Item Limit 2000000
DWARF.Import Data Types true
DWARF.Import Functions true
DWARF.Import Local Variable Info true
DWARF.Maximum Name Length 2000
DWARF.Output DWARF DIE Info false
DWARF.Output Source Info false
DWARF.Preload All DIEs false
DWARF.Try To Pack Structs true
Data Reference true
Data Reference.Address Table Alignment 1
Data Reference.Address Table Minimum Size 2
Data Reference.Align End of Strings false
Data Reference.Ascii String References true
Data Reference.Create Address Tables false
Data Reference.Minimum String Length 5
Data Reference.References to Pointers true
Data Reference.Relocation Table Guide true
Data Reference.Respect Execute Flag true
Data Reference.Subroutine References true
Data Reference.Switch Table References false
Data Reference.Unicode String References true
Decompiler Parameter ID false
Decompiler Parameter ID.Analysis Clear Level ANALYSIS
Decompiler Parameter ID.Analysis Decompiler Timeout (sec) 60
Decompiler Parameter ID.Commit Data Types true
Decompiler Parameter ID.Commit Void Return Values false
Decompiler Parameter ID.Prototype Evaluation __stdcall
Decompiler Switch Analysis true
Decompiler Switch Analysis.Analysis Decompiler Timeout (sec) 60
Demangler GNU true
Demangler GNU.Apply Function Calling Conventions true
Demangler GNU.Apply Function Signatures true
Demangler GNU.Demangle Only Known Mangled Symbols false
Demangler GNU.Demangler Format AUTO
Demangler GNU.Use Deprecated Demangler false
Disassemble Entry Points true
Disassemble Entry Points.Respect Execute Flag true
ELF Scalar Operand References true
ELF Scalar Operand References.Relocation Table Guide true
Embedded Media true
Embedded Media.Create Analysis Bookmarks true
External Entry References true
External Symbol Resolver true
Function ID true
Function ID.Always Apply FID Labels false
Function ID.Create Analysis Bookmarks true
Function ID.Instruction Count Threshold 14.6
Function ID.Multiple Match Threshold 30.0
Function Start Search true
Function Start Search After Code true
Function Start Search After Code.Bookmark Functions false
Function Start Search After Code.Search Data Blocks false
Function Start Search After Data true
Function Start Search After Data.Bookmark Functions false
Function Start Search After Data.Search Data Blocks false
Function Start Search.Bookmark Functions false
Function Start Search.Search Data Blocks false
GCC Exception Handlers true
GCC Exception Handlers.Create Try Catch Comments true
Kaiju Function Hashing true
Kaiju Function Hashing.Include Basic Blocks false
Kaiju Function Hashing.Logging Level WARN
Kaiju Function Hashing.Minimum Instruction Count 1
Non-Returning Functions - Discovered true
Non-Returning Functions - Discovered.Create Analysis Bookmarks true
Non-Returning Functions - Discovered.Function Non-return Threshold 3
Non-Returning Functions - Discovered.Repair Flow Damage true
Non-Returning Functions - Known true
Non-Returning Functions - Known.Create Analysis Bookmarks true
Reference true
Reference.Address Table Alignment 1
Reference.Address Table Minimum Size 2
Reference.Align End of Strings false
Reference.Ascii String References true
Reference.Create Address Tables false
Reference.Minimum String Length 5
Reference.References to Pointers true
Reference.Relocation Table Guide true
Reference.Respect Execute Flag true
Reference.Subroutine References true
Reference.Switch Table References false
Reference.Unicode String References true
Shared Return Calls true
Shared Return Calls.Allow Conditional Jumps false
Shared Return Calls.Assume Contiguous Functions Only true
Stack true
Stack.Create Local Variables true
Stack.Create Param Variables true
Stack.useNewFunctionStackAnalysis true
Subroutine References true
Subroutine References.Create Thunks Early true
Variadic Function Signature Override false
Variadic Function Signature Override.Create Analysis Bookmarks false
x86 Constant Reference Analyzer true
x86 Constant Reference Analyzer.Create Data from pointer false
x86 Constant Reference Analyzer.Function parameter/return Pointer analysis true
x86 Constant Reference Analyzer.Max Threads 2
x86 Constant Reference Analyzer.Min absolute reference 4
x86 Constant Reference Analyzer.Require pointer param data type false
x86 Constant Reference Analyzer.Speculative reference max 512
x86 Constant Reference Analyzer.Speculative reference min 1024
x86 Constant Reference Analyzer.Stored Value Pointer analysis true
x86 Constant Reference Analyzer.Trust values read from writable memory true
Ghidra oo.clang Decompiler Options
Decompiler Option Value
Prototype Evaluation __stdcall
Ghidra oo.clang Specification extensions Options
Specification extensions Option Value
FormatVersion 0
VersionCounter 0
Ghidra oo.clang Analyzers Options
Analyzers Option Value
ASCII Strings true
ASCII Strings.Create Strings Containing Existing Strings true
ASCII Strings.Create Strings Containing References true
ASCII Strings.Force Model Reload false
ASCII Strings.Minimum String Length LEN_5
ASCII Strings.Model File StringModel.sng
ASCII Strings.Require Null Termination for String true
ASCII Strings.Search Only in Accessible Memory Blocks true
ASCII Strings.String Start Alignment ALIGN_1
ASCII Strings.String end alignment 4
Aggressive Instruction Finder false
Aggressive Instruction Finder.Create Analysis Bookmarks true
Apply Data Archives true
Apply Data Archives.Archive Chooser [Auto-Detect]
Apply Data Archives.Create Analysis Bookmarks true
Apply Data Archives.GDT User File Archive Path None
Apply Data Archives.User Project Archive Path None
CERT Classic Function Hashing Classic false
CERT Classic Function Hashing Classic.Include Basic Blocks false
CERT Classic Function Hashing Classic.Logging Level WARN
CERT Classic Function Hashing Classic.Minimum Instruction Count 1
Call Convention ID true
Call Convention ID.Analysis Decompiler Timeout (sec) 60
Call-Fixup Installer true
Condense Filler Bytes false
Condense Filler Bytes.Filler Value Auto
Condense Filler Bytes.Minimum number of sequential bytes 1
Create Address Tables true
Create Address Tables.Allow Offcut References false
Create Address Tables.Auto Label Table false
Create Address Tables.Create Analysis Bookmarks true
Create Address Tables.Maxmimum Pointer Distance 16777215
Create Address Tables.Minimum Pointer Address 4132
Create Address Tables.Minimum Table Size 2
Create Address Tables.Pointer Alignment 1
Create Address Tables.Relocation Table Guide true
Create Address Tables.Table Alignment 4
DWARF true
DWARF Line Number false
DWARF.Add Inlined Functions Comments false
DWARF.Add Lexical Block Comments false
DWARF.Create Function Signatures true
DWARF.Debug Item Limit 2000000
DWARF.Import Data Types true
DWARF.Import Functions true
DWARF.Import Local Variable Info true
DWARF.Maximum Name Length 2000
DWARF.Output DWARF DIE Info false
DWARF.Output Source Info false
DWARF.Preload All DIEs false
DWARF.Try To Pack Structs true
Data Reference true
Data Reference.Address Table Alignment 1
Data Reference.Address Table Minimum Size 2
Data Reference.Align End of Strings false
Data Reference.Ascii String References true
Data Reference.Create Address Tables false
Data Reference.Minimum String Length 5
Data Reference.References to Pointers true
Data Reference.Relocation Table Guide true
Data Reference.Respect Execute Flag true
Data Reference.Subroutine References true
Data Reference.Switch Table References false
Data Reference.Unicode String References true
Decompiler Parameter ID false
Decompiler Parameter ID.Analysis Clear Level ANALYSIS
Decompiler Parameter ID.Analysis Decompiler Timeout (sec) 60
Decompiler Parameter ID.Commit Data Types true
Decompiler Parameter ID.Commit Void Return Values false
Decompiler Parameter ID.Prototype Evaluation __stdcall
Decompiler Switch Analysis true
Decompiler Switch Analysis.Analysis Decompiler Timeout (sec) 60
Demangler GNU true
Demangler GNU.Apply Function Calling Conventions true
Demangler GNU.Apply Function Signatures true
Demangler GNU.Demangle Only Known Mangled Symbols false
Demangler GNU.Demangler Format AUTO
Demangler GNU.Use Deprecated Demangler false
Disassemble Entry Points true
Disassemble Entry Points.Respect Execute Flag true
ELF Scalar Operand References true
ELF Scalar Operand References.Relocation Table Guide true
Embedded Media true
Embedded Media.Create Analysis Bookmarks true
External Entry References true
External Symbol Resolver true
Function ID true
Function ID.Always Apply FID Labels false
Function ID.Create Analysis Bookmarks true
Function ID.Instruction Count Threshold 14.6
Function ID.Multiple Match Threshold 30.0
Function Start Search true
Function Start Search After Code true
Function Start Search After Code.Bookmark Functions false
Function Start Search After Code.Search Data Blocks false
Function Start Search After Data true
Function Start Search After Data.Bookmark Functions false
Function Start Search After Data.Search Data Blocks false
Function Start Search.Bookmark Functions false
Function Start Search.Search Data Blocks false
GCC Exception Handlers true
GCC Exception Handlers.Create Try Catch Comments true
Kaiju Function Hashing true
Kaiju Function Hashing.Include Basic Blocks false
Kaiju Function Hashing.Logging Level WARN
Kaiju Function Hashing.Minimum Instruction Count 1
Non-Returning Functions - Discovered true
Non-Returning Functions - Discovered.Create Analysis Bookmarks true
Non-Returning Functions - Discovered.Function Non-return Threshold 3
Non-Returning Functions - Discovered.Repair Flow Damage true
Non-Returning Functions - Known true
Non-Returning Functions - Known.Create Analysis Bookmarks true
Reference true
Reference.Address Table Alignment 1
Reference.Address Table Minimum Size 2
Reference.Align End of Strings false
Reference.Ascii String References true
Reference.Create Address Tables false
Reference.Minimum String Length 5
Reference.References to Pointers true
Reference.Relocation Table Guide true
Reference.Respect Execute Flag true
Reference.Subroutine References true
Reference.Switch Table References false
Reference.Unicode String References true
Shared Return Calls true
Shared Return Calls.Allow Conditional Jumps false
Shared Return Calls.Assume Contiguous Functions Only true
Stack true
Stack.Create Local Variables true
Stack.Create Param Variables true
Stack.useNewFunctionStackAnalysis true
Subroutine References true
Subroutine References.Create Thunks Early true
Variadic Function Signature Override false
Variadic Function Signature Override.Create Analysis Bookmarks false
x86 Constant Reference Analyzer true
x86 Constant Reference Analyzer.Create Data from pointer false
x86 Constant Reference Analyzer.Function parameter/return Pointer analysis true
x86 Constant Reference Analyzer.Max Threads 2
x86 Constant Reference Analyzer.Min absolute reference 4
x86 Constant Reference Analyzer.Require pointer param data type false
x86 Constant Reference Analyzer.Speculative reference max 512
x86 Constant Reference Analyzer.Speculative reference min 1024
x86 Constant Reference Analyzer.Stored Value Pointer analysis true
x86 Constant Reference Analyzer.Trust values read from writable memory true

Diff Stats

Stat Value
added_funcs_len 1
deleted_funcs_len 1
modified_funcs_len 10
added_symbols_len 1
deleted_symbols_len 1
diff_time 0.8117258548736572
deleted_strings_len 2
added_strings_len 1
match_types Counter({'SymbolsHash': 27, 'ExternalsName': 12, 'ExactInstructionsFunctionHasher': 1, 'StructuralGraphExactHash': 1, 'StringsRefsHasher': 1})
items_to_process 14
diff_types Counter({'address': 10, 'length': 9, 'code': 7, 'refcount': 6, 'called': 6, 'name': 2, 'fullname': 2, 'sig': 2, 'parent': 1})
unmatched_funcs_len 2
total_funcs_len 109
matched_funcs_len 107
matched_funcs_with_code_changes_len 7
matched_funcs_with_non_code_changes_len 3
matched_funcs_no_changes_len 97
match_func_similarity_percent 90.6542%
func_match_overall_percent 98.1651%
first_matches Counter({'SymbolsHash': 27, 'ExactInstructionsFunctionHasher': 1, 'StructuralGraphExactHash': 1, 'StringsRefsHasher': 1})
pie showData
    title All Matches
"SymbolsHash" : 27
"ExternalsName" : 12
"ExactInstructionsFunctionHasher" : 1
"StructuralGraphExactHash" : 1
"StringsRefsHasher" : 1
Loading
pie showData
    title First Matches
"SymbolsHash" : 27
"ExactInstructionsFunctionHasher" : 1
"StructuralGraphExactHash" : 1
"StringsRefsHasher" : 1
Loading
pie showData
    title Diff Stats
"added_funcs_len" : 1
"deleted_funcs_len" : 1
"modified_funcs_len" : 10
Loading
pie showData
    title Symbols
"added_symbols_len" : 1
"deleted_symbols_len" : 1
Loading

Strings

pie showData
    title Strings
"deleted_strings_len" : 2
"added_strings_len" : 1
Loading

Strings Diff

--- deleted strings
+++ added strings
@@ -1,2 +1 @@
-s_Cls1::func1()
-s_getenv_.debug_str
+s_clang_version_9.0.1_(Red_Hat_9.0_.debug_str

String References

Old

String Ref Count Ref Func
s_Cls1::func1()_0040202c 1 func1
s_getenv_.debug_str__00000000 1

New

String Ref Count Ref Func
s_clang_version_9.0.1_(Red_Hat_9.0_.debug_str__00000000 1

Deleted

Cls1::func1

Function Meta

Key oo.gcc
name func1
fullname Cls1::func1
refcount 4
length 117
called ::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
std::ctype::do_widen
calling
paramcount 1
address 00401760
sig void __thiscall func1(Cls1 * this)
sym_type Function
sym_source IMPORTED
external False
--- Cls1::func1
+++ Cls1::func1
@@ -1,26 +0,0 @@
-
-/* DWARF original prototype: void func1(Cls1 * this) */
-
-void __thiscall Cls1::func1(Cls1 *this)
-
-{
-  long *plVar1;
-  
-  std::__ostream_insert<char,std::char_traits<char>>
-            ((basic_ostream *)&std::cout,"Cls1::func1()",0xd);
-  plVar1 = *(long **)(&DAT_00404170 + *(long *)(std::cout + -0x18));
-  if (plVar1 == (long *)0x0) {
-                    /* WARNING: Subroutine does not return */
-    std::__throw_bad_cast();
-  }
-  if (*(char *)(plVar1 + 7) == '\0') {
-    std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
-  }
-  std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
-  std::basic_ostream<char,std::char_traits<char>>::flush();
-  return;
-}
-

Added

::__gxx_personality_v0

Function Meta

Key oo.clang
name __gxx_personality_v0
fullname ::__gxx_personality_v0
refcount 1
length 0
called
calling
paramcount 0
address EXTERNAL:00000009
sig undefined __gxx_personality_v0(void)
sym_type Function
sym_source IMPORTED
external True

No code available for ::__gxx_personality_v0

Modified

Modified functions contain code changes

frame_dummy

Match Info

Key oo.gcc - oo.clang
diff_type code,length,address
ratio 0.89
i_ratio 0.0
m_ratio 0.67
b_ratio 0.67
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name frame_dummy frame_dummy
fullname frame_dummy frame_dummy
refcount 3 3
length 6 2
called register_tm_clones register_tm_clones
calling __libc_csu_init __libc_csu_init
paramcount 0 0
address 004011f0 00400a50
sig undefined frame_dummy(void) undefined frame_dummy(void)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

frame_dummy Diff

--- frame_dummy
+++ frame_dummy
@@ -1,8 +1,10 @@
+
+/* WARNING: Removing unreachable block (ram,0x004009ff) */
+/* WARNING: Removing unreachable block (ram,0x00400a09) */
 
 void frame_dummy(void)
 
 {
-  register_tm_clones();
   return;
 }
 

Cls3::func1

Match Info

Key oo.gcc - oo.clang
diff_type code,refcount,length,address,called
ratio 0.9
i_ratio 0.11
m_ratio 0.81
b_ratio 0.95
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name func1 func1
fullname Cls3::func1 Cls3::func1
refcount 9 6
length 117 104
called ::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
std::ctype::do_widen
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
calling myfunc myfunc
paramcount 1 1
address 004017e0 00400b70
sig void __thiscall func1(Cls3 * this) void __thiscall func1(Cls3 * this)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

Cls3::func1 Called Diff

--- Cls3::func1 called
+++ Cls3::func1 called
@@ -6 +5,0 @@
-std::ctype<char>::do_widen

Cls3::func1 Diff

--- Cls3::func1
+++ Cls3::func1
@@ -1,26 +1,24 @@
 
 /* DWARF original prototype: void func1(Cls3 * this) */
 
 void __thiscall Cls3::func1(Cls3 *this)
 
 {
   long *plVar1;
   
   std::__ostream_insert<char,std::char_traits<char>>
             ((basic_ostream *)&std::cout,"Cls3::func1()",0xd);
   plVar1 = *(long **)(&DAT_0 + *(long *)(std::cout + -0x18));
   if (plVar1 == (long *)0x0) {
                     /* WARNING: Subroutine does not return */
     std::__throw_bad_cast();
   }
   if (*(char *)(plVar1 + 7) == '\0') {
     std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
+    (**(code **)(*plVar1 + 0x30))(plVar1,10);
   }
   std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
   std::basic_ostream<char,std::char_traits<char>>::flush();
   return;
 }
 

Cls2::func4

Match Info

Key oo.gcc - oo.clang
diff_type code,refcount,length,address,called
ratio 0.9
i_ratio 0.11
m_ratio 0.81
b_ratio 0.95
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name func4 func4
fullname Cls2::func4 Cls2::func4
refcount 5 4
length 117 104
called ::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
std::ctype::do_widen
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
calling myfunc myfunc
paramcount 1 1
address 004015e0 00400cc0
sig void __thiscall func4(Cls2 * this) void __thiscall func4(Cls2 * this)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

Cls2::func4 Called Diff

--- Cls2::func4 called
+++ Cls2::func4 called
@@ -6 +5,0 @@
-std::ctype<char>::do_widen

Cls2::func4 Diff

--- Cls2::func4
+++ Cls2::func4
@@ -1,26 +1,24 @@
 
 /* DWARF original prototype: void func4(Cls2 * this) */
 
 void __thiscall Cls2::func4(Cls2 *this)
 
 {
   long *plVar1;
   
   std::__ostream_insert<char,std::char_traits<char>>
             ((basic_ostream *)&std::cout,"Cls2::func4()",0xd);
   plVar1 = *(long **)(&DAT_0 + *(long *)(std::cout + -0x18));
   if (plVar1 == (long *)0x0) {
                     /* WARNING: Subroutine does not return */
     std::__throw_bad_cast();
   }
   if (*(char *)(plVar1 + 7) == '\0') {
     std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
+    (**(code **)(*plVar1 + 0x30))(plVar1,10);
   }
   std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
   std::basic_ostream<char,std::char_traits<char>>::flush();
   return;
 }
 

myfunc

Match Info

Key oo.gcc - oo.clang
diff_type code,length,address,called
ratio 0.21
i_ratio 0.09
m_ratio 0.38
b_ratio 0.46
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name myfunc myfunc
fullname myfunc myfunc
refcount 4 4
length 945 252
called
Expand for full list:
::operator.new
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
Cls2::func4
Cls3::func1
Cls3::func3
operator.delete
std::ctype::do_widen
::operator.delete
::operator.new
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
Cls2::func4
Cls3::func1
Cls3::func3
calling main main
paramcount 0 0
address 00401200 00400a60
sig void myfunc(void) void myfunc(void)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

myfunc Called Diff

--- myfunc called
+++ myfunc called
@@ -0,0 +1 @@
+<EXTERNAL>::operator.delete
@@ -10,2 +10,0 @@
-operator.delete
-std::ctype<char>::do_widen

myfunc Diff

--- myfunc
+++ myfunc
@@ -1,120 +1,42 @@
 
 /* WARNING: Unknown calling convention */
 
 void myfunc(void)
 
 {
   long *plVar1;
-  _func_int_varargs *p_Var2;
-  long *plVar3;
+  long *plVar2;
+  undefined8 *puVar3;
   Cls3 *e;
   Cls1 *f;
-  Cls1 *c1;
-  code *pcVar4;
   
-  plVar3 = (long *)operator_new(0x60);
-  *plVar3 = (long)&PTR_func1_004020f0;
-  plVar3[2] = (long)&DAT_0;
-  *(undefined4 *)(plVar3 + 0xb) = 0x2a;
-  e = (Cls3 *)operator_new(0x60);
-  (e->super_Cls1)._vptr_Cls1 = (_func_int_varargs **)&PTR_func1_004020f0;
-  (e->super_Cls2)._vptr_Cls2 = (_func_int_varargs **)&DAT_0;
-  e->i = 0x2a;
-  f = (Cls1 *)operator_new(0x10);
-  f->x = 0;
-  f->y = '\0';
-  f->_vptr_Cls1 = (_func_int_varargs **)&PTR_func1_004020d8;
+  plVar2 = (long *)operator_new(0x60);
+  *plVar2 = (long)&PTR_func1_00400dd0;
+  plVar2[2] = (long)&DAT_0;
+  *(undefined4 *)(plVar2 + 0xb) = 0x2a;
+  puVar3 = (undefined8 *)operator_new(0x60);
+  *puVar3 = &PTR_func1_00400dd0;
+  puVar3[2] = &DAT_0;
+  *(undefined4 *)(puVar3 + 0xb) = 0x2a;
   std::__ostream_insert<char,std::char_traits<char>>
             ((basic_ostream *)&std::cout,"Cls1::func2()",0xd);
   plVar1 = *(long **)(&DAT_1 + *(long *)(std::cout + -0x18));
-  if (plVar1 == (long *)0x0) goto LAB_2;
+  if (plVar1 == (long *)0x0) {
+                    /* WARNING: Subroutine does not return */
+    std::__throw_bad_cast();
+  }
   if (*(char *)(plVar1 + 7) == '\0') {
     std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
+    (**(code **)(*plVar1 + 0x30))(plVar1,10);
   }
   std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
   std::basic_ostream<char,std::char_traits<char>>::flush();
-  if (*(code **)*plVar3 == Cls3::func1) {
-    std::__ostream_insert<char,std::char_traits<char>>
-              ((basic_ostream *)&std::cout,"Cls3::func1()",0xd);
-    plVar1 = *(long **)(&DAT_1 + *(long *)(std::cout + -0x18));
-    if (plVar1 == (long *)0x0) goto LAB_2;
-    if (*(char *)(plVar1 + 7) == '\0') {
-      std::ctype<char>::_M_widen_init();
-      if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-        (**(code **)(*plVar1 + 0x30))(plVar1,10);
-      }
-    }
-    std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
-    std::basic_ostream<char,std::char_traits<char>>::flush();
-    pcVar4 = *(code **)(*plVar3 + 8);
-    if (pcVar4 != Cls3::func3) goto LAB_3;
-LAB_4:
-    std::__ostream_insert<char,std::char_traits<char>>
-              ((basic_ostream *)&std::cout,"Cls3::func3()",0xd);
-    plVar1 = *(long **)(&DAT_1 + *(long *)(std::cout + -0x18));
-    if (plVar1 == (long *)0x0) goto LAB_2;
-    if (*(char *)(plVar1 + 7) == '\0') {
-      std::ctype<char>::_M_widen_init();
-      if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-        (**(code **)(*plVar1 + 0x30))(plVar1,10);
-      }
-    }
-    std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
-    std::basic_ostream<char,std::char_traits<char>>::flush();
-  }
-  else {
-    (**(code **)*plVar3)(plVar3);
-    pcVar4 = *(code **)(*plVar3 + 8);
-    if (pcVar4 == Cls3::func3) goto LAB_4;
-LAB_3:
-    (*pcVar4)(plVar3);
-  }
-  if (*(code **)(plVar3[2] + 8) == Cls2::func4) {
-    std::__ostream_insert<char,std::char_traits<char>>
-              ((basic_ostream *)&std::cout,"Cls2::func4()",0xd);
-    plVar1 = *(long **)(&DAT_1 + *(long *)(std::cout + -0x18));
-    if (plVar1 == (long *)0x0) goto LAB_2;
-    if (*(char *)(plVar1 + 7) == '\0') {
-      std::ctype<char>::_M_widen_init();
-      if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-        (**(code **)(*plVar1 + 0x30))(plVar1,10);
-      }
-    }
-    std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
-    std::basic_ostream<char,std::char_traits<char>>::flush();
-    p_Var2 = *(e->super_Cls1)._vptr_Cls1;
-  }
-  else {
-    (**(code **)(plVar3[2] + 8))(plVar3 + 2);
-    p_Var2 = *(e->super_Cls1)._vptr_Cls1;
-  }
-  if (p_Var2 == Cls3::func1) {
-    std::__ostream_insert<char,std::char_traits<char>>
-              ((basic_ostream *)&std::cout,"Cls3::func1()",0xd);
-    plVar1 = *(long **)(&DAT_1 + *(long *)(std::cout + -0x18));
-    if (plVar1 == (long *)0x0) {
-LAB_2:
-                    /* WARNING: Subroutine does not return */
-      std::__throw_bad_cast();
-    }
-    if (*(char *)(plVar1 + 7) == '\0') {
-      std::ctype<char>::_M_widen_init();
-      if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-        (**(code **)(*plVar1 + 0x30))(plVar1,10);
-      }
-    }
-    std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
-    std::basic_ostream<char,std::char_traits<char>>::flush();
-  }
-  else {
-    (*p_Var2)(e);
-  }
-  operator_delete(plVar3,0x60);
-  operator_delete(e,0x10);
-  operator_delete(f,0x10);
+  (**(code **)*plVar2)(plVar2);
+  (**(code **)(*plVar2 + 8))(plVar2);
+  (**(code **)(plVar2[2] + 8))(plVar2 + 2);
+  (**(code **)*puVar3)(puVar3);
+  operator_delete(plVar2);
+  operator_delete(puVar3);
   return;
 }
 

Cls3::func3

Match Info

Key oo.gcc - oo.clang
diff_type code,refcount,length,address,called
ratio 0.9
i_ratio 0.11
m_ratio 0.81
b_ratio 0.95
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name func3 func3
fullname Cls3::func3 Cls3::func3
refcount 7 5
length 117 104
called ::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
std::ctype::do_widen
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
calling myfunc myfunc
paramcount 1 1
address 00401660 00400be0
sig void __thiscall func3(Cls3 * this) void __thiscall func3(Cls3 * this)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

Cls3::func3 Called Diff

--- Cls3::func3 called
+++ Cls3::func3 called
@@ -6 +5,0 @@
-std::ctype<char>::do_widen

Cls3::func3 Diff

--- Cls3::func3
+++ Cls3::func3
@@ -1,26 +1,24 @@
 
 /* DWARF original prototype: void func3(Cls3 * this) */
 
 void __thiscall Cls3::func3(Cls3 *this)
 
 {
   long *plVar1;
   
   std::__ostream_insert<char,std::char_traits<char>>
             ((basic_ostream *)&std::cout,"Cls3::func3()",0xd);
   plVar1 = *(long **)(&DAT_0 + *(long *)(std::cout + -0x18));
   if (plVar1 == (long *)0x0) {
                     /* WARNING: Subroutine does not return */
     std::__throw_bad_cast();
   }
   if (*(char *)(plVar1 + 7) == '\0') {
     std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
+    (**(code **)(*plVar1 + 0x30))(plVar1,10);
   }
   std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
   std::basic_ostream<char,std::char_traits<char>>::flush();
   return;
 }
 

__do_global_dtors_aux

Match Info

Key oo.gcc - oo.clang
diff_type code,length,address
ratio 0.78
i_ratio 0.53
m_ratio 0.95
b_ratio 0.95
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name __do_global_dtors_aux __do_global_dtors_aux
fullname __do_global_dtors_aux __do_global_dtors_aux
refcount 2 2
length 32 28
called deregister_tm_clones deregister_tm_clones
calling
paramcount 0 0
address 004011c0 00400a20
sig undefined __do_global_dtors_aux(void) undefined __do_global_dtors_aux(void)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

__do_global_dtors_aux Diff

--- __do_global_dtors_aux
+++ __do_global_dtors_aux
@@ -1,12 +1,12 @@
 
 void __do_global_dtors_aux(void)
 
 {
-  if (completed_0 == '\0') {
+  if (completed_7246 == '\0') {
     deregister_tm_clones();
-    completed_0 = 1;
+    completed_7246 = 1;
     return;
   }
   return;
 }
 

Cls3::func3

Match Info

Key oo.gcc - oo.clang
diff_type code,name,fullname,length,sig,address,called,parent
ratio 0.9
i_ratio 0.11
m_ratio 0.81
b_ratio 0.95
match_types StringsRefsHasher

Function Meta Diff

Key oo.gcc oo.clang
name func3 _ZThn16_N4Cls35func3Ev
fullname Cls3::func3 _ZThn16_N4Cls35func3Ev
refcount 3 3
length 117 104
called ::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
std::ctype::do_widen
::std::__ostream_insert<char,std::char_traits>
::std::__throw_bad_cast
::std::basic_ostream<char,std::char_traits>::flush
::std::basic_ostream<char,std::char_traits>::put
::std::ctype::_M_widen_init
calling
paramcount 1 1
address 004016e0 00400c50
sig undefined __thiscall func3(Cls3 * this) void __thiscall _ZThn16_N4Cls35func3Ev(Cls3 * this)
sym_type Function Function
sym_source ANALYSIS IMPORTED
external False False

Cls3::func3 Called Diff

--- Cls3::func3 called
+++ _ZThn16_N4Cls35func3Ev called
@@ -6 +5,0 @@
-std::ctype<char>::do_widen

Cls3::func3 Diff

--- Cls3::func3
+++ _ZThn16_N4Cls35func3Ev
@@ -1,26 +1,24 @@
 
-/* non-virtual thunk to Cls3::func3() */
+/* DWARF original prototype: void _ZThn16_N4Cls35func3Ev(Cls3 * this) */
 
-void __thiscall Cls3::func3(Cls3 *this)
+void __thiscall _ZThn16_N4Cls35func3Ev(Cls3 *this)
 
 {
   long *plVar1;
   
   std::__ostream_insert<char,std::char_traits<char>>
             ((basic_ostream *)&std::cout,"Cls3::func3()",0xd);
   plVar1 = *(long **)(&DAT_0 + *(long *)(std::cout + -0x18));
   if (plVar1 == (long *)0x0) {
                     /* WARNING: Subroutine does not return */
     std::__throw_bad_cast();
   }
   if (*(char *)(plVar1 + 7) == '\0') {
     std::ctype<char>::_M_widen_init();
-    if (*(code **)(*plVar1 + 0x30) != std::ctype<char>::do_widen) {
-      (**(code **)(*plVar1 + 0x30))(plVar1,10);
-    }
+    (**(code **)(*plVar1 + 0x30))(plVar1,10);
   }
   std::basic_ostream<char,std::char_traits<char>>::put(-0x80);
   std::basic_ostream<char,std::char_traits<char>>::flush();
   return;
 }
 

Modified (No Code Changes)

Slightly modified functions have no code changes, rather differnces in:

  • refcount
  • length
  • called
  • calling
  • name
  • fullname

_init

Match Info

Key oo.gcc - oo.clang
diff_type refcount,address,called
ratio 1.0
i_ratio 0.57
m_ratio 1.0
b_ratio 1.0
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name _init _init
fullname _init _init
refcount 5 4
length 26 26
called ::gmon_start
::gmon_start
::gmon_start
::gmon_start
calling __libc_csu_init __libc_csu_init
paramcount 1 1
address 00401000 00400868
sig int __stdcall _init(EVP_PKEY_CTX * ctx) int __stdcall _init(EVP_PKEY_CTX * ctx)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

_init Called Diff

main

Match Info

Key oo.gcc - oo.clang
diff_type refcount,length,address
ratio 1.0
i_ratio 0.4
m_ratio 0.6
b_ratio 0.6
match_types SymbolsHash

Function Meta Diff

Key oo.gcc oo.clang
name main main
fullname main main
refcount 5 4
length 16 10
called myfunc myfunc
calling _start _start
paramcount 0 0
address 004010f0 00400b60
sig int main(void) int main(void)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

_GLOBAL__sub_I__Z6myfuncv

Match Info

Key oo.gcc - oo.clang
diff_type name,fullname,refcount,length,sig,address
ratio 1.0
i_ratio 0.0
m_ratio 0.75
b_ratio 0.75
match_types StructuralGraphExactHash

Function Meta Diff

Key oo.gcc oo.clang
name _GLOBAL__sub_I__Z6myfuncv _GLOBAL__sub_I_oo.cpp
fullname _GLOBAL__sub_I__Z6myfuncv _GLOBAL__sub_I_oo.cpp
refcount 4 5
length 38 32
called ::__cxa_atexit
::std::ios_base::Init::Init
std::ios_base::Init::~Init
::__cxa_atexit
::std::ios_base::Init::Init
std::ios_base::Init::~Init
calling __libc_csu_init __libc_csu_init
paramcount 0 0
address 00401100 00400960
sig void _GLOBAL__sub_I__Z6myfuncv(void) void _GLOBAL__sub_I_oo.cpp(void)
sym_type Function Function
sym_source IMPORTED IMPORTED
external False False

Generated with ghidriff version: 0.6.2 on 2024-03-25T10:50:06

oo.gcc-oo2.gcc Diff

TOC

Visual Chart Diff

flowchart LR



subgraph oo2.gcc
    
    
end

subgraph oo.gcc
    
    
end

Loading
pie showData
    title Function Matches - 100.0000%
"unmatched_funcs_len" : 0
"matched_funcs_len" : 111
Loading
pie showData
    title Matched Function Similarity - 100.0000%
"matched_funcs_with_code_changes_len" : 0
"matched_funcs_with_non_code_changes_len" : 0
"matched_funcs_no_changes_len" : 111
Loading

Metadata

Ghidra Diff Engine

Command Line

Captured Command Line

ghidriff --project-location ghidra_projects --project-name ghidriff --symbols-path symbols --threaded --log-level INFO --file-log-level INFO --log-path ghidriff.log --min-func-len 10 --bsim --max-ram-percent 60.0 --max-section-funcs 200 oo.gcc oo2.gcc

Verbose Args

--old ['./oo.gcc'] --new [['./oo2.gcc']] --engine VersionTrackingDiff --output-path ghidriffs --summary False --project-location ghidra_projects --project-name ghidriff --symbols-path symbols --threaded True --force-analysis False --force-diff False --no-symbols False --log-level INFO --file-log-level INFO --log-path ghidriff.log --va False --min-func-len 10 --use-calling-counts False --bsim True --bsim-full False --max-ram-percent 60.0 --print-flags False --jvm-args None --side-by-side False --max-section-funcs 200 --md-title None

Binary Metadata Diff

--- oo.gcc Meta
+++ oo2.gcc Meta
@@ -1,43 +1,43 @@
-Program Name: oo.gcc
+Program Name: oo2.gcc
 Language ID: x86:LE:64:default (3.0)
 Compiler ID: gcc
 Processor: x86
 Endian: Little
 Address Size: 64
 Minimum Address: 00400000
 Maximum Address: _elfSectionHeaders::0000093f
-# of Bytes: 48552
+# of Bytes: 48732
 # of Memory Blocks: 39
-# of Instructions: 509
-# of Defined Data: 314
-# of Functions: 55
-# of Symbols: 178
-# of Data Types: 217
+# of Instructions: 510
+# of Defined Data: 320
+# of Functions: 56
+# of Symbols: 181
+# of Data Types: 219
 # of Data Type Categories: 43
 Analyzed: true
 Created With Ghidra Version: 11.0.1
 DWARF Loaded: true
-Date Created: Mon Mar 25 10:49:01 EDT 2024
+Date Created: Mon Mar 25 10:49:02 EDT 2024
 ELF File Type: executable
-ELF Note[GNU BuildId]: 4d12649b76b3f58c668e541b2b43bd5db95bfc2b
+ELF Note[GNU BuildId]: e2f89f7fdf5aff5edd0cc9dc8cf864c0730f1364
 ELF Note[required kernel ABI]: Linux 2.6.32
 ELF Original Image Base: 0x400000
 ELF Prelinked: false
-ELF Source File [   0]: oo.cpp
+ELF Source File [   0]: oo2.cpp
 ELF Source File [   1]: crtstuff.c
 ELF Source File [   2]: crtstuff.c
 ELF Source File [   3]: 
 Elf Comment[0]: GCC: (GNU) 4.8.5 20150623 (Red Hat 4.8.5-44)
 Elf Comment[1]: GCC: (GNU) 11.2.1 20220127 (Red Hat 11.2.1-9)
 Executable Format: Executable and Linking Format (ELF)
-Executable Location: /Users/eschwartz/fuzzyhash-test/exp1/oo.gcc
-Executable MD5: d0ff2abed10c4904f24ed484f7a463e9
-Executable SHA256: 314edbbd5cc80ec295625ce2e920fcf9323c5dc5cf684591f717d880be656906
-FSRL: file:///Users/eschwartz/fuzzyhash-test/exp1/oo.gcc?MD5=d0ff2abed10c4904f24ed484f7a463e9
+Executable Location: /Users/eschwartz/fuzzyhash-test/exp1/oo2.gcc
+Executable MD5: b5e5045cb6d65d68a66e02d474005b10
+Executable SHA256: 676b7945418199785b8a70e3a087768a7b92ded0970591ff2607857465f9974c
+FSRL: file:///Users/eschwartz/fuzzyhash-test/exp1/oo2.gcc?MD5=b5e5045cb6d65d68a66e02d474005b10
 Preferred Root Namespace Category: 
 Relocatable: false
 Required Library [    0]: libstdc++.so.6
 Required Library [    1]: libm.so.6
 Required Library [    2]: libgcc_s.so.1
 Required Library [    3]: libc.so.6
 Should Ask To Analyze: false

Program Options

Ghidra oo.gcc Decompiler Options
Decompiler Option Value
Prototype Evaluation __stdcall
Ghidra oo.gcc Specification extensions Options
Specification extensions Option Value
FormatVersion 0
VersionCounter 0
Ghidra oo.gcc Analyzers Options
Analyzers Option Value
ASCII Strings true
ASCII Strings.Create Strings Containing Existing Strings true
ASCII Strings.Create Strings Containing References true
ASCII Strings.Force Model Reload false
ASCII Strings.Minimum String Length LEN_5
ASCII Strings.Model File StringModel.sng
ASCII Strings.Require Null Termination for String true
ASCII Strings.Search Only in Accessible Memory Blocks true
ASCII Strings.String Start Alignment ALIGN_1
ASCII Strings.String end alignment 4
Aggressive Instruction Finder false
Aggressive Instruction Finder.Create Analysis Bookmarks true
Apply Data Archives true
Apply Data Archives.Archive Chooser [Auto-Detect]
Apply Data Archives.Create Analysis Bookmarks true
Apply Data Archives.GDT User File Archive Path None
Apply Data Archives.User Project Archive Path None
CERT Classic Function Hashing Classic false
CERT Classic Function Hashing Classic.Include Basic Blocks false
CERT Classic Function Hashing Classic.Logging Level WARN
CERT Classic Function Hashing Classic.Minimum Instruction Count 1
Call Convention ID true
Call Convention ID.Analysis Decompiler Timeout (sec) 60
Call-Fixup Installer true
Condense Filler Bytes false
Condense Filler Bytes.Filler Value Auto
Condense Filler Bytes.Minimum number of sequential bytes 1
Create Address Tables true
Create Address Tables.Allow Offcut References false
Create Address Tables.Auto Label Table false
Create Address Tables.Create Analysis Bookmarks true
Create Address Tables.Maxmimum Pointer Distance 16777215
Create Address Tables.Minimum Pointer Address 4132
Create Address Tables.Minimum Table Size 2
Create Address Tables.Pointer Alignment 1
Create Address Tables.Relocation Table Guide true
Create Address Tables.Table Alignment 4
DWARF true
DWARF Line Number false
DWARF.Add Inlined Functions Comments false
DWARF.Add Lexical Block Comments false
DWARF.Create Function Signatures true
DWARF.Debug Item Limit 2000000
DWARF.Import Data Types true
DWARF.Import Functions true
DWARF.Import Local Variable Info true
DWARF.Maximum Name Length 2000
DWARF.Output DWARF DIE Info false
DWARF.Output Source Info false
DWARF.Preload All DIEs false
DWARF.Try To Pack Structs true
Data Reference true
Data Reference.Address Table Alignment 1
Data Reference.Address Table Minimum Size 2
Data Reference.Align End of Strings false
Data Reference.Ascii String References true
Data Reference.Create Address Tables false
Data Reference.Minimum String Length 5
Data Reference.References to Pointers true
Data Reference.Relocation Table Guide true
Data Reference.Respect Execute Flag true
Data Reference.Subroutine References true
Data Reference.Switch Table References false
Data Reference.Unicode String References true
Decompiler Parameter ID false
Decompiler Parameter ID.Analysis Clear Level ANALYSIS
Decompiler Parameter ID.Analysis Decompiler Timeout (sec) 60
Decompiler Parameter ID.Commit Data Types true
Decompiler Parameter ID.Commit Void Return Values false
Decompiler Parameter ID.Prototype Evaluation __stdcall
Decompiler Switch Analysis true
Decompiler Switch Analysis.Analysis Decompiler Timeout (sec) 60
Demangler GNU true
Demangler GNU.Apply Function Calling Conventions true
Demangler GNU.Apply Function Signatures true
Demangler GNU.Demangle Only Known Mangled Symbols false
Demangler GNU.Demangler Format AUTO
Demangler GNU.Use Deprecated Demangler false
Disassemble Entry Points true
Disassemble Entry Points.Respect Execute Flag true
ELF Scalar Operand References true
ELF Scalar Operand References.Relocation Table Guide true
Embedded Media true
Embedded Media.Create Analysis Bookmarks true
External Entry References true
External Symbol Resolver true
Function ID true
Function ID.Always Apply FID Labels false
Function ID.Create Analysis Bookmarks true
Function ID.Instruction Count Threshold 14.6
Function ID.Multiple Match Threshold 30.0
Function Start Search true
Function Start Search After Code true
Function Start Search After Code.Bookmark Functions false
Function Start Search After Code.Search Data Blocks false
Function Start Search After Data true
Function Start Search After Data.Bookmark Functions false
Function Start Search After Data.Search Data Blocks false
Function Start Search.Bookmark Functions false
Function Start Search.Search Data Blocks false
GCC Exception Handlers true
GCC Exception Handlers.Create Try Catch Comments true
Kaiju Function Hashing true
Kaiju Function Hashing.Include Basic Blocks false
Kaiju Function Hashing.Logging Level WARN
Kaiju Function Hashing.Minimum Instruction Count 1
Non-Returning Functions - Discovered true
Non-Returning Functions - Discovered.Create Analysis Bookmarks true
Non-Returning Functions - Discovered.Function Non-return Threshold 3
Non-Returning Functions - Discovered.Repair Flow Damage true
Non-Returning Functions - Known true
Non-Returning Functions - Known.Create Analysis Bookmarks true
Reference true
Reference.Address Table Alignment 1
Reference.Address Table Minimum Size 2
Reference.Align End of Strings false
Reference.Ascii String References true
Reference.Create Address Tables false
Reference.Minimum String Length 5
Reference.References to Pointers true
Reference.Relocation Table Guide true
Reference.Respect Execute Flag true
Reference.Subroutine References true
Reference.Switch Table References false
Reference.Unicode String References true
Shared Return Calls true
Shared Return Calls.Allow Conditional Jumps false
Shared Return Calls.Assume Contiguous Functions Only true
Stack true
Stack.Create Local Variables true
Stack.Create Param Variables true
Stack.useNewFunctionStackAnalysis true
Subroutine References true
Subroutine References.Create Thunks Early true
Variadic Function Signature Override false
Variadic Function Signature Override.Create Analysis Bookmarks false
x86 Constant Reference Analyzer true
x86 Constant Reference Analyzer.Create Data from pointer false
x86 Constant Reference Analyzer.Function parameter/return Pointer analysis true
x86 Constant Reference Analyzer.Max Threads 2
x86 Constant Reference Analyzer.Min absolute reference 4
x86 Constant Reference Analyzer.Require pointer param data type false
x86 Constant Reference Analyzer.Speculative reference max 512
x86 Constant Reference Analyzer.Speculative reference min 1024
x86 Constant Reference Analyzer.Stored Value Pointer analysis true
x86 Constant Reference Analyzer.Trust values read from writable memory true
Ghidra oo2.gcc Decompiler Options
Decompiler Option Value
Prototype Evaluation __stdcall
Ghidra oo2.gcc Specification extensions Options
Specification extensions Option Value
FormatVersion 0
VersionCounter 0
Ghidra oo2.gcc Analyzers Options
Analyzers Option Value
ASCII Strings true
ASCII Strings.Create Strings Containing Existing Strings true
ASCII Strings.Create Strings Containing References true
ASCII Strings.Force Model Reload false
ASCII Strings.Minimum String Length LEN_5
ASCII Strings.Model File StringModel.sng
ASCII Strings.Require Null Termination for String true
ASCII Strings.Search Only in Accessible Memory Blocks true
ASCII Strings.String Start Alignment ALIGN_1
ASCII Strings.String end alignment 4
Aggressive Instruction Finder false
Aggressive Instruction Finder.Create Analysis Bookmarks true
Apply Data Archives true
Apply Data Archives.Archive Chooser [Auto-Detect]
Apply Data Archives.Create Analysis Bookmarks true
Apply Data Archives.GDT User File Archive Path None
Apply Data Archives.User Project Archive Path None
CERT Classic Function Hashing Classic false
CERT Classic Function Hashing Classic.Include Basic Blocks false
CERT Classic Function Hashing Classic.Logging Level WARN
CERT Classic Function Hashing Classic.Minimum Instruction Count 1
Call Convention ID true
Call Convention ID.Analysis Decompiler Timeout (sec) 60
Call-Fixup Installer true
Condense Filler Bytes false
Condense Filler Bytes.Filler Value Auto
Condense Filler Bytes.Minimum number of sequential bytes 1
Create Address Tables true
Create Address Tables.Allow Offcut References false
Create Address Tables.Auto Label Table false
Create Address Tables.Create Analysis Bookmarks true
Create Address Tables.Maxmimum Pointer Distance 16777215
Create Address Tables.Minimum Pointer Address 4132
Create Address Tables.Minimum Table Size 2
Create Address Tables.Pointer Alignment 1
Create Address Tables.Relocation Table Guide true
Create Address Tables.Table Alignment 4
DWARF true
DWARF Line Number false
DWARF.Add Inlined Functions Comments false
DWARF.Add Lexical Block Comments false
DWARF.Create Function Signatures true
DWARF.Debug Item Limit 2000000
DWARF.Import Data Types true
DWARF.Import Functions true
DWARF.Import Local Variable Info true
DWARF.Maximum Name Length 2000
DWARF.Output DWARF DIE Info false
DWARF.Output Source Info false
DWARF.Preload All DIEs false
DWARF.Try To Pack Structs true
Data Reference true
Data Reference.Address Table Alignment 1
Data Reference.Address Table Minimum Size 2
Data Reference.Align End of Strings false
Data Reference.Ascii String References true
Data Reference.Create Address Tables false
Data Reference.Minimum String Length 5
Data Reference.References to Pointers true
Data Reference.Relocation Table Guide true
Data Reference.Respect Execute Flag true
Data Reference.Subroutine References true
Data Reference.Switch Table References false
Data Reference.Unicode String References true
Decompiler Parameter ID false
Decompiler Parameter ID.Analysis Clear Level ANALYSIS
Decompiler Parameter ID.Analysis Decompiler Timeout (sec) 60
Decompiler Parameter ID.Commit Data Types true
Decompiler Parameter ID.Commit Void Return Values false
Decompiler Parameter ID.Prototype Evaluation __stdcall
Decompiler Switch Analysis true
Decompiler Switch Analysis.Analysis Decompiler Timeout (sec) 60
Demangler GNU true
Demangler GNU.Apply Function Calling Conventions true
Demangler GNU.Apply Function Signatures true
Demangler GNU.Demangle Only Known Mangled Symbols false
Demangler GNU.Demangler Format AUTO
Demangler GNU.Use Deprecated Demangler false
Disassemble Entry Points true
Disassemble Entry Points.Respect Execute Flag true
ELF Scalar Operand References true
ELF Scalar Operand References.Relocation Table Guide true
Embedded Media true
Embedded Media.Create Analysis Bookmarks true
External Entry References true
External Symbol Resolver true
Function ID true
Function ID.Always Apply FID Labels false
Function ID.Create Analysis Bookmarks true
Function ID.Instruction Count Threshold 14.6
Function ID.Multiple Match Threshold 30.0
Function Start Search true
Function Start Search After Code true
Function Start Search After Code.Bookmark Functions false
Function Start Search After Code.Search Data Blocks false
Function Start Search After Data true
Function Start Search After Data.Bookmark Functions false
Function Start Search After Data.Search Data Blocks false
Function Start Search.Bookmark Functions false
Function Start Search.Search Data Blocks false
GCC Exception Handlers true
GCC Exception Handlers.Create Try Catch Comments true
Kaiju Function Hashing true
Kaiju Function Hashing.Include Basic Blocks false
Kaiju Function Hashing.Logging Level WARN
Kaiju Function Hashing.Minimum Instruction Count 1
Non-Returning Functions - Discovered true
Non-Returning Functions - Discovered.Create Analysis Bookmarks true
Non-Returning Functions - Discovered.Function Non-return Threshold 3
Non-Returning Functions - Discovered.Repair Flow Damage true
Non-Returning Functions - Known true
Non-Returning Functions - Known.Create Analysis Bookmarks true
Reference true
Reference.Address Table Alignment 1
Reference.Address Table Minimum Size 2
Reference.Align End of Strings false
Reference.Ascii String References true
Reference.Create Address Tables false
Reference.Minimum String Length 5
Reference.References to Pointers true
Reference.Relocation Table Guide true
Reference.Respect Execute Flag true
Reference.Subroutine References true
Reference.Switch Table References false
Reference.Unicode String References true
Shared Return Calls true
Shared Return Calls.Allow Conditional Jumps false
Shared Return Calls.Assume Contiguous Functions Only true
Stack true
Stack.Create Local Variables true
Stack.Create Param Variables true
Stack.useNewFunctionStackAnalysis true
Subroutine References true
Subroutine References.Create Thunks Early true
Variadic Function Signature Override false
Variadic Function Signature Override.Create Analysis Bookmarks false
x86 Constant Reference Analyzer true
x86 Constant Reference Analyzer.Create Data from pointer false
x86 Constant Reference Analyzer.Function parameter/return Pointer analysis true
x86 Constant Reference Analyzer.Max Threads 2
x86 Constant Reference Analyzer.Min absolute reference 4
x86 Constant Reference Analyzer.Require pointer param data type false
x86 Constant Reference Analyzer.Speculative reference max 512
x86 Constant Reference Analyzer.Speculative reference min 1024
x86 Constant Reference Analyzer.Stored Value Pointer analysis true
x86 Constant Reference Analyzer.Trust values read from writable memory true

Diff Stats

Stat Value
added_funcs_len 0
deleted_funcs_len 0
modified_funcs_len 0
added_symbols_len 0
deleted_symbols_len 0
diff_time 0.5281860828399658
deleted_strings_len 0
added_strings_len 0
match_types Counter({'SymbolsHash': 31, 'ExternalsName': 12, 'ExactBytesFunctionHasher': 2})
items_to_process 0
diff_types Counter()
unmatched_funcs_len 0
total_funcs_len 111
matched_funcs_len 111
matched_funcs_with_code_changes_len 0
matched_funcs_with_non_code_changes_len 0
matched_funcs_no_changes_len 111
match_func_similarity_percent 100.0000%
func_match_overall_percent 100.0000%
first_matches Counter({'SymbolsHash': 31, 'ExactBytesFunctionHasher': 2})
pie showData
    title All Matches
"SymbolsHash" : 31
"ExternalsName" : 12
"ExactBytesFunctionHasher" : 2
Loading
pie showData
    title First Matches
"SymbolsHash" : 31
"ExactBytesFunctionHasher" : 2
Loading
pie showData
    title Diff Stats
"added_funcs_len" : 0
"deleted_funcs_len" : 0
"modified_funcs_len" : 0
Loading
pie showData
    title Symbols
"added_symbols_len" : 0
"deleted_symbols_len" : 0
Loading

Strings

No string differences found

Deleted

Added

Modified

Modified functions contain code changes

Modified (No Code Changes)

Slightly modified functions have no code changes, rather differnces in:

  • refcount
  • length
  • called
  • calling
  • name
  • fullname

Generated with ghidriff version: 0.6.2 on 2024-03-25T10:49:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment