public class DylibStubContentsScrubber extends Object implements FileContentsScrubber
The linker itself does not actually care about the symbol addresses, it just wants to ensure any referenced symbols exist. That means we can reset the addresses to any value we would like. Note that the symbol addresses themselves are already invalid in the dylib stub, as the contents (i.e., binary instructions) have been stripped by "strip".
Dylib stubs produced by "strip" are still dependent on symbol addresses and the UUID. To make them independent, we do the following:
FileScrubber.ScrubException
Constructor and Description |
---|
DylibStubContentsScrubber() |
Modifier and Type | Method and Description |
---|---|
void |
scrubFile(FileChannel file)
Override this method to perform the content modification.
|
public void scrubFile(FileChannel file) throws IOException, FileScrubber.ScrubException
FileContentsScrubber
scrubFile
in interface FileContentsScrubber
IOException
FileScrubber.ScrubException