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

nxdk creates invalid XBE under some circumstances #324

Closed
JayFoxRox opened this issue Apr 25, 2020 · 1 comment
Closed

nxdk creates invalid XBE under some circumstances #324

JayFoxRox opened this issue Apr 25, 2020 · 1 comment
Labels
invalid Issues which shouldn't even be here

Comments

@JayFoxRox
Copy link
Member

JayFoxRox commented Apr 25, 2020

I had a weird issue while porting HODE: JayFoxRox/hode#1 (comment) ; related Makefile section:

Whenever I'd link the compiled object files for the XBR scaler, the resulting XBE was not loadable by the Xbox kernel within XQEMU (it boots into dashboard instead of launching into the nxdk binary). I was using LLVM 9 at the time.
I was also getting some linker warnings, but I'm not sure if that is related to loading failure of the XBE.

I suspect this is an issue with cxbe (more likely) or LLD (less likely). It's also possible that this is a bug in extract-xiso (potentially XboxDev/extract-xiso#29), but I doubt that.

Ideally someone would create a minimal test case to reproduce it.

@JayFoxRox JayFoxRox added the critical Issues that could affect the system-stability or cause dangerous side-effects label May 25, 2020
@JayFoxRox
Copy link
Member Author

Thanks to @thrimbor who investigated this, we know that the XBE and EXE have a huge .data section (64MiB):

Section Name                     : 0x00010479 (".data")
Flags                            : 0x00000003 (Writable) (Preload) 
Virtual Address                  : 0x001A0000
Virtual Size                     : 0x04010000

This is a "bug" in libxbr that is documented here: Treeki/libxbr-standalone#3.
- It uses a 24-bit index lookup table with each element at 32-bit = 64MiB lookup table.

So this isn't a bug with nxdk, but a problem with libxbr.

I'll remove the "critical" label, mark this as "invalid" and close this issue.

@JayFoxRox JayFoxRox added invalid Issues which shouldn't even be here and removed critical Issues that could affect the system-stability or cause dangerous side-effects labels Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues which shouldn't even be here
Development

No branches or pull requests

1 participant