-
Notifications
You must be signed in to change notification settings - Fork 48
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
Wrong sign extension for 32bit relocations #564
Labels
Comments
After cross-referencing the 32 bit relocations that are set as "signed" in
@claziss besides |
@BrunoASMauricio corrected relocs types:
|
claziss
changed the title
Wrong sign extension for R_ARC_32_ME relocation
Wrong sign extension for 32bit relocations
Jun 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following minimal example showcases how the 32 bit relocation symbol
R_ARC_32_ME
is malfunctioning.asm.S
tarc.ld
Compiling it with:
arc64-elf-gcc asm.S -mcpu=hs6x --specs=nsim.specs -T tarc.ld -nostartfiles -nostdlib
Yields
This happens because the 0x8000_0000 gets sign extended when it shouldn't. Replacing that value with 0x7000_0000 "fixes this".
It is expected for these values to be unsigned.
The text was updated successfully, but these errors were encountered: