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

[arm] account for signed bit when calculating offset to PLT entry #18454

Merged
merged 2 commits into from
Jan 15, 2020

Conversation

lewurm
Copy link
Contributor

@lewurm lewurm commented Jan 14, 2020

See bl documentation (make sure you look at the thumb2 one):
Screenshot 2020-01-14 at 22 43 33

Fixes #18247

@lewurm lewurm requested a review from vargaz January 14, 2020 21:50
@@ -1128,7 +1128,7 @@ mono_arm_get_thumb_plt_entry (guint8 *code)

g_assert ((t1 >> 11) == 0x1e);

s = (t1 >> 10) & 0x1;
s = (t1 >> 10) & 0x1 ? 1 : 0;
imm10 = (t1 >> 0) & 0x3ff;
Copy link
Contributor

@vargaz vargaz Jan 15, 2020

Choose a reason for hiding this comment

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

This is not needed.

/* Sign extend from 24 bits to 32 bits */
imm32 = ((gint32)imm32 << 8) >> 8;
/* Sign extend from 25 bits to 32 bits */
imm32 = ((gint32)imm32 << 7) >> 7;
Copy link
Contributor

@jaykrell jaykrell Jan 15, 2020

Choose a reason for hiding this comment

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

@lewurm
Copy link
Contributor Author

lewurm commented Jan 15, 2020

@monojenkins squash

@lewurm
Copy link
Contributor Author

lewurm commented Jan 15, 2020

@monojenkins backport 2019-12

@lewurm
Copy link
Contributor Author

lewurm commented Jan 15, 2020

@monojenkins backport 2019-10

@monojenkins monojenkins merged commit bdde94b into mono:master Jan 15, 2020
monojenkins added a commit that referenced this pull request Jan 16, 2020
… entry (#18461)

[2019-10] [arm] account for signed bit when calculating offset to PLT entry

See `bl` documentation (make sure you look at the thumb2 one):
<img width="1003" alt="Screenshot 2020-01-14 at 22 43 33" src="https://user-images.githubusercontent.com/75403/72385601-2bb53b00-3720-11ea-9858-d73bc2d02a7e.png">


Fixes #18247

Backport of #18454.

/cc @lewurm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants