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

Local static functions are missing from diff #156

Closed
Francessco121 opened this issue Jan 19, 2025 · 6 comments
Closed

Local static functions are missing from diff #156

Francessco121 opened this issue Jan 19, 2025 · 6 comments

Comments

@Francessco121
Copy link

Francessco121 commented Jan 19, 2025

In the Dinosaur Planet decomp we have DLL code that makes heavy use of static functions which must be static in order to match calling code. These are missing from objdiff as it ignores local symbols with a size of zero: https://github.com/encounter/objdiff/blob/v2.7.1/objdiff-core/src/obj/read.rs#L170-L176. Removing this code fixes the issue but I imagine also breaks other projects.

I don't totally understand why these symbols have a size of zero but if it helps the compiler is IDO 5.3.

readelf symbol table output
(num, value, size, type, bind, vis, ndx, name):
Image

Missing functions in UI (CLI can't diff them either, just says it cant find the symbol):
Image

@encounter
Copy link
Owner

Fixed in v3.0.0-alpha.1

@Francessco121
Copy link
Author

Francessco121 commented Mar 3, 2025

Unfortunately, this didn't fully fix the issue. Not sure if this is a different problem or related.
Static functions show up now:

Image

But the diff is just the first instruction repeated:

Image

Non-statics work fine

@encounter encounter reopened this Mar 3, 2025
@encounter
Copy link
Owner

How weird! Do you have objects I can reproduce with?

@Francessco121
Copy link
Author

Yeah,
flash.zip

(had to zip it for GitHub, its just the one .o file inside)

I can try to do my own debugging soon as well and make sure its not something screwy with our setup. Tho I've had no issues with the previous objdiff version with those few lines removed that I mentioned in the original comment.

@encounter
Copy link
Owner

It’s definitely a regression in v3 alpha, I just got another report about it. Will fix asap

@Francessco121
Copy link
Author

Works perfect now, thanks! ❤

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

2 participants