Skip to content

Conversation

EllipticEllipsis
Copy link
Contributor

Not sure if this is the right way to handle particularly the absolute ones, but I needed these to get it to build the mips objects I was testing it on correctly.

Copy link
Owner

@encounter encounter left a comment

Choose a reason for hiding this comment

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

Thanks! I'm wondering if Absolute should be without the *4, but that'd be an easy fix in the future.

@encounter encounter merged commit 39f2636 into encounter:main Sep 21, 2022
ObjRelocKind::MipsHi16 | ObjRelocKind::MipsLo16 => {
(addend & 0x0000FFFF) * 4
}
ObjRelocKind::Mips32 => addend * 4,

Choose a reason for hiding this comment

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

These multiplications by 4 don't make sense to me, outside of the Mips26 case where it is indeed right

(also lo16/hi16 need to be joined together and lo16 relocations are s16's; maybe that's handled elsewhere or a todo for now though)

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for the info, I'll check some MIPS objects to figure out what's proper here.

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.

3 participants