GP-0: Mach-O PRELINK binaries were not getting their load command data

marked up
This commit is contained in:
Ryan Kurtz
2024-04-01 12:41:59 -04:00
parent b30012d79a
commit 2e09c209ac

View File

@@ -88,6 +88,7 @@ public class MachoPrelinkProgramBuilder extends MachoProgramBuilder {
for (MachoInfo info : machoInfoList) { for (MachoInfo info : machoInfoList) {
info.processMemoryBlocks(); info.processMemoryBlocks();
info.markupHeaders(); info.markupHeaders();
info.markupLoadCommandData();
info.addToProgramTree(); info.addToProgramTree();
monitor.incrementProgress(1); monitor.incrementProgress(1);
} }
@@ -217,7 +218,7 @@ public class MachoPrelinkProgramBuilder extends MachoProgramBuilder {
* Processes memory blocks for this Mach-O. * Processes memory blocks for this Mach-O.
* *
* @throws Exception If there was a problem processing memory blocks for this Mach-O. * @throws Exception If there was a problem processing memory blocks for this Mach-O.
* @see MachoPrelinkProgramBuilder#processMemoryBlocks(MachHeader, String, boolean, boolean) * @see MachoProgramBuilder#processMemoryBlocks(MachHeader, String, boolean, boolean)
*/ */
public void processMemoryBlocks() throws Exception { public void processMemoryBlocks() throws Exception {
MachoPrelinkProgramBuilder.this.processMemoryBlocks(header, name, true, false); MachoPrelinkProgramBuilder.this.processMemoryBlocks(header, name, true, false);
@@ -227,7 +228,7 @@ public class MachoPrelinkProgramBuilder extends MachoProgramBuilder {
* Marks up the Mach-O headers. * Marks up the Mach-O headers.
* *
* @throws Exception If there was a problem marking up the Mach-O's headers. * @throws Exception If there was a problem marking up the Mach-O's headers.
* @see MachoPrelinkProgramBuilder#markupHeaders(MachHeader, Address) * @see MachoProgramBuilder#markupHeaders(MachHeader, Address)
*/ */
public void markupHeaders() throws Exception { public void markupHeaders() throws Exception {
MachoPrelinkProgramBuilder.this.markupHeaders(header, headerAddr); MachoPrelinkProgramBuilder.this.markupHeaders(header, headerAddr);
@@ -237,6 +238,16 @@ public class MachoPrelinkProgramBuilder extends MachoProgramBuilder {
} }
} }
/**
* Marks up the Mach-O load command data.
*
* @throws Exception If there was a problem marking up the Mach-O's load command data.
* @see MachoProgramBuilder#markupLoadCommandData(MachHeader, String)
*/
public void markupLoadCommandData() throws Exception {
MachoPrelinkProgramBuilder.this.markupLoadCommandData(header, name);
}
/** /**
* Adds an entry to the program tree for this Mach-O. * Adds an entry to the program tree for this Mach-O.
* *