FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ARM: support R_ARM_ABS32_NOI relocation by dhruv0703 · Pull Request #2010 · qualcomm/eld · GitHub

/ eld Public

ARM: support R_ARM_ABS32_NOI relocation - #2010

Open
Dhruv Shah (dhruv0703) wants to merge 4 commits into
qualcomm:mainfrom
dhruv0703:fix/arm-abs32-noi
Open

Dhruv Shah (dhruv0703) wants to merge 4 commits into
qualcomm:mainfrom
dhruv0703:fix/arm-abs32-noi

Conversation

Copy link
Copy Markdown

Summary

Adds support for R_ARM_ABS32_NOI in the ARM backend.

R_ARM_ABS32_NOI computes S + A without applying the Thumb/interworking bit used by R_ARM_ABS32.

Changes

  • Register R_ARM_ABS32_NOI with the ARM relocation dispatch table.
  • Add an abs32_noi relocation handler.
  • Preserve the existing R_ARM_ABS32 relocation flow for dynamic relocations, PLT handling, weak undefined symbols, and non-ALLOC sections.
  • Avoid restoring the Thumb bit when applying the final relocation.
  • Add a regression test comparing R_ARM_ABS32 and R_ARM_ABS32_NOI against the same Thumb symbol.

The regression test places a Thumb function at 0x1000 and verifies:

R_ARM_ABS32      -> 0x00001001
R_ARM_ABS32_NOI  -> 0x00001000

Testing

  • git diff --check passes.
  • Added a focused ARM standalone regression test under test/ARM/standalone/Relocs/R_ARM_ABS32_NOI/.
  • The ELD ARM test could not be executed locally because the required configured build/test tools (llvm-lit-arm-default, clang, llvm-objdump, and ld.eld) were not available in the local environment.

Fixes #1988

Copy link
Copy Markdown
Contributor

Hi Dhruv Shah (@dhruv0703)

All commits must be signed. You can see more information here: https://github.com/qualcomm/eld/pull/2010/checks?check_run_id=109668419751

If you have any questions let me know.

Copy link
Copy Markdown
Author

Thanks, Steven Ramirez Rosa (@Steven6798) . I’ve signed the commit and force-pushed the updated commit to the PR. The new commit is cc6948a. Please let me know if anything else is needed.

Copy link
Copy Markdown
Contributor

Thanks, Steven Ramirez Rosa (Steven Ramirez Rosa (@Steven6798)) . I’ve signed the commit and force-pushed the updated commit to the PR. The new commit is cc6948a. Please let me know if anything else is needed.

I'm not seeing the signature in the commit message. Also, you should add part of the summary to the commit message. That way we have access to that information directly in the commit.

Copy link
Copy Markdown
Author

Thanks, Steven Ramirez Rosa (@Steven6798) . I’ve updated the commit to address both points.
The commit now includes the required Signed-off-by line, and I also expanded the commit message with a summary of the R_ARM_ABS32_NOI implementation and the regression test.
The updated commit is 73e190d. Please let me know if there’s anything else you’d like me to adjust.

Copy link
Copy Markdown
Contributor

Dhruv Shah (@dhruv0703) can you look into why your test is failing.

Add handling for R_ARM_ABS32_NOI in the ARM relocation dispatch
and implement S + A semantics without restoring the Thumb
interworking bit.

Add a regression test comparing R_ARM_ABS32 and
R_ARM_ABS32_NOI against the same Thumb symbol.

Signed-off-by: Dhruv Shah <dhruv072002@gmail.com>

Copy link
Copy Markdown
Author

Thanks, Steven Ramirez Rosa (@Steven6798) I traced the failure to the FileCheck expectation. The relocation output itself was correct, but llvm-objdump printed the section address as 2000 rather than 00002000. I updated the regression test accordingly and pushed the fix in 90d124e.

Copy link
Copy Markdown
Author

quic-areg Parth (@parth-07) Hey there, can you please take a look at my PR and see if any other changes need to be made to get it merged?

pReloc.target() = S + A;
return Relocator::OK;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please update the ARM relocation reference as part of developer docs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Updated the ARM relocation developer reference to document R_ARM_ABS32_NOI with S + A semantics and no Thumb/interworking bit, and removed it from the unsupported relocation list. Thanks for pointing this out.

Add R_ARM_ABS32_NOI to the supported ARM relocation reference with S + A semantics and remove it from the unsupported relocation list.

Signed-off-by: Dhruv Shah <dhruv072002@gmail.com>

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ARM] Implement R_ARM_ABS32_NOI relocation

3 participants


Back | FazBrowse Home | New Git URL