This repository was archived by the owner on Oct 13, 2019. It is now read-only.
Load modules and resolve functions in crt0 #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE:
This is just a concept and I have not tested yet.
This breaks some compatibility.
You no longer have to write initializing functions at the beginning of
_main
. The new crt0 resolves only functions we need. So it's easier to use and doesn't waste memory.This change also removes redundant code (+163, -465) in old resolving code and allow you to add functions with less code.
Please note that I have not tested because I don't have a PS4. I have some concerns:
I found a code to reload libScePad module in an example. I applied the trick to all codes to keep the code simple. I know the overhead is very small, but it may cause a problem.
loadModule
All modules will be loaded with
loadModule
although some of the current initializers usesceKernelLoadStartModule
.This change is incompatible with position independent code. It's possible to support position independent code, but you have to resolve the GOT.