MCPcopy Create free account
hub / github.com/clienthax/Ps3GhidraScripts / getPhdrArrayAddress

Method getPhdrArrayAddress

ghidra_scripts/Ps3ElfUtils.java:79–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 // there should be a offset to this...
78 // TODO use e_phoffset instead
79 public Address getPhdrArrayAddress() throws Exception {
80
81 for(long i = elfHeader.getStart().getOffset(); i < elfHeader.getEnd().getOffset(); i++) {
82 Address addr = elfHeader.getStart().getNewAddress(i);
83 final Data dataAt = script.getDataAt(addr);
84 if (dataAt != null) {
85 script.println(""+dataAt.getDataType().getName());
86 }
87 if(dataAt != null && dataAt.getDataType().getName().startsWith("Elf64_Phdr")) {
88 return addr;
89 }
90 }
91
92
93
94 script.printerr("Couldn't find Elf64_Phdr[]\n");
95 return null;
96 }
97
98 private List<ElfSection> parseSections(Data elfData) throws Exception {
99

Callers 1

applyProcessInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected