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

elf.reloc: fix mips64 parse error #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wynemo
Copy link

@wynemo wynemo commented Oct 22, 2023

Copy link
Owner

@m4b m4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to understand why these are cfgd out

@@ -253,16 253,58 @@ pub mod reloc64 {
pub const SIZEOF_RELA: usize = 8 8 8;
pub const SIZEOF_REL: usize = 8 8;

#[cfg(not(all(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would these bit masking helper functions be cfg’d out on mips systems?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see further down is the other condition. So I have to reread the linked thread but is the issue with how mips itself does some bit masking here or if the binary is from a mips arch ? If the latter a cfg is not appropriate as we should be able to read a mips elf binary on a whatever machine.

Copy link
Owner

@m4b m4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I think the correct solution here is to deprecate the older functions and pass down whether it’s a mips binary to these functions, with a conditional inside the new functions where you have cfgs now basically

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

Successfully merging this pull request may close these issues.

2 participants