Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section sorting order may differ between raw and virtual addresses #35

Open
itsybitsypixel opened this issue Jun 12, 2024 · 0 comments
Open

Comments

@itsybitsypixel
Copy link
Contributor

XBEs where the section order is not the same when sorting by raw vs. virtual addresses will produce Expected $SECTION_RAW_ADDR for $SECTION_NAME, got $RAW_OFF warnings when packing and the resulting XBE will have its sections be arranged differently in file data compared to the original.

While this shouldn't have any effect on the loading or playability of the output XBE, it won't be "faithful" to the original and may have other side effects e.g. large patch files (IPS, BPS, etc.) between original and output if pyxbe is used when creating patches.

In my case (http://redump.org/disc/13503/), changing key of sorted to use each sections' raw_addr instead of virtual_addr when constructing section data fixes this but that could affect user code that e.g. assigns only the virtual address when inserting new section(s) and leaves assigning a raw address for pyxbe to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant