mirror of
https://github.com/cemu-project/GhidraRPXLoader.git
synced 2024-11-22 09:19:17 +01:00
Don't save section data for the special sections.
This commit is contained in:
parent
2f4362b159
commit
3085d0b374
@ -46,7 +46,11 @@ public class RPXUtils {
|
|||||||
if (offset != 0) {
|
if (offset != 0) {
|
||||||
if ((flags & SHT_NOBITS) != SHT_NOBITS) {
|
if ((flags & SHT_NOBITS) != SHT_NOBITS) {
|
||||||
byte[] data = h.getData();
|
byte[] data = h.getData();
|
||||||
|
if (h.getType() == SHT_RPL_CRCS || h.getType() == SHT_RPL_EXPORTS || h.getType() == SHT_RPL_IMPORTS
|
||||||
|
|| h.getType() == SHT_RPL_FILEINFO) {
|
||||||
|
data = new byte[0];
|
||||||
|
curSize = 0;
|
||||||
|
} else {
|
||||||
if ((flags & SHF_RPL_ZLIB) == SHF_RPL_ZLIB) {
|
if ((flags & SHF_RPL_ZLIB) == SHF_RPL_ZLIB) {
|
||||||
monitor.setMessage("Decompressing section " + h.getTypeAsString());
|
monitor.setMessage("Decompressing section " + h.getTypeAsString());
|
||||||
long section_size_inflated = ByteBuffer.wrap(Arrays.copyOf(data, 4)).getInt() & 0xFFFFFFFF;
|
long section_size_inflated = ByteBuffer.wrap(Arrays.copyOf(data, 4)).getInt() & 0xFFFFFFFF;
|
||||||
@ -64,6 +68,8 @@ public class RPXUtils {
|
|||||||
flags &= ~SHF_RPL_ZLIB;
|
flags &= ~SHF_RPL_ZLIB;
|
||||||
data = decompressed;
|
data = decompressed;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
long newEnd = shdr_data_elf_offset + curSize;
|
long newEnd = shdr_data_elf_offset + curSize;
|
||||||
|
|
||||||
buffer = Utils.checkAndGrowByteBuffer(buffer, newEnd);
|
buffer = Utils.checkAndGrowByteBuffer(buffer, newEnd);
|
||||||
|
Loading…
Reference in New Issue
Block a user