File tree Expand file tree Collapse file tree
src/main/java/org/ajsmith/jadx/plugins/nativelibraries/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import jadx .api .plugins .gui .JadxGuiContext ;
77import net .fornwall .jelf .ElfFile ;
88import net .fornwall .jelf .ElfSymbol ;
9+ import net .fornwall .jelf .ElfSymbolTableSection ;
910import org .jetbrains .annotations .NotNull ;
1011import org .jetbrains .annotations .Nullable ;
1112import org .slf4j .Logger ;
@@ -48,7 +49,14 @@ public void loadFromResource(ResourceFile resource) {
4849
4950 // Parse symbols to find exported methods
5051 ElfFile elf = ElfFile .from (bytes );
51- for (ElfSymbol symbol : elf .getDynamicSymbolTableSection ().symbols ) {
52+
53+ ElfSymbolTableSection dynSymSection = elf .getDynamicSymbolTableSection ();
54+ if (dynSymSection == null ) {
55+ LOG .debug ("No dynamic symbol table section was found" );
56+ return ;
57+ }
58+
59+ for (ElfSymbol symbol : dynSymSection .symbols ) {
5260 String name = symbol .getName ();
5361 if (!NativeMethod .isJavaMethod (name )) continue ;
5462
You can’t perform that action at this time.
0 commit comments