vitasdk / vita-headers

Documentation:
https://docs.vitasdk.org
MIT License
224 stars 90 forks source link

Use real library/module NIDs in included db #7

Closed yifanlu closed 7 years ago

yifanlu commented 8 years ago

In the included databases, it seems like the module/library nids all have placeholder values. For extras, we should either come up with a NID generation system (ideally, reverse sony's linker and see how nids are generated), which is needed for vitasdk to support creating dynamic libraries or use hard coded values for now.

For the sony imports, the module nids never change, so we should keep them in the database. Library nids do change, so we can either remove that field from the specifications or mark it optional (and make it an array of "known nids" or something). The advantage for the second option is that it may be useful in the future.

MrNetrix commented 8 years ago

Yeah. Right now they are using "unique" placeholders for now in order for them to work with the toolchain. It hasn't been a priority so far since the real NIDs aren't needed for it to work with UVLoader and there have been more important issues to fix. On Oct 11, 2015 21:37, "Yifan Lu" notifications@github.com wrote:

In the included databases, it seems like the module/library nids all have placeholder values. For extras, we should either come up with a NID generation system (ideally, reverse sony's linker and see how nids are generated), which is needed for vitasdk to support creating dynamic libraries or use hard coded values for now.

For the sony imports, the module nids never change, so we should keep them in the database. Library nids do change, so we can either remove that field from the specifications or mark it optional (and make it an array of "known nids" or something). The advantage for the second option is that it may be useful in the future.

— Reply to this email directly or view it on GitHub https://github.com/vitasdk/vita-headers/issues/7.

devnoname120 commented 7 years ago

I think that @xerpi has built a Vita program that retrieves NIDs from all modules, this could be used to automatically set the library NIDs to the correct ones.

yifanlu commented 7 years ago

@devnoname120 can you link to the tool?

EDIT: Nvm, I see https://github.com/vitasdk/vita-headers/pull/86