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

read/xcoff: add support for relocation entries. #477

Merged
merged 2 commits into from Nov 4, 2022

Conversation

EsmeYi
Copy link
Contributor

@EsmeYi EsmeYi commented Oct 26, 2022

No description provided.

@EsmeYi EsmeYi marked this pull request as draft October 26, 2022 16:53
@EsmeYi EsmeYi marked this pull request as ready for review October 27, 2022 03:13
| xcoff::R_RLA
| xcoff::R_BA
| xcoff::R_RBA
| xcoff::R_TLS => (RelocationKind::Absolute, 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain your reasoning for R_TLS being absolute? I'm not sure about it. It might be okay, and there may not be a better alternative.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems treated as absolute in llvm

  if (Type == XCOFF::RelocationType::R_POS ||
      Type == XCOFF::RelocationType::R_TLS)
    // The FixedValue should be symbol's virtual address in this object file
    // plus any constant value that we might get.
    FixedValue = getVirtualAddress(SymA, SymASec) + Target.getConstant();

src/read/xcoff/relocation.rs Outdated Show resolved Hide resolved
src/read/xcoff/section.rs Outdated Show resolved Hide resolved
src/read/xcoff/section.rs Outdated Show resolved Hide resolved
@philipc philipc merged commit a7b1655 into gimli-rs:master Nov 4, 2022
@EsmeYi EsmeYi deleted the xcoff_rel branch November 6, 2022 16:08
@EsmeYi EsmeYi restored the xcoff_rel branch November 7, 2022 03:29
@EsmeYi EsmeYi deleted the xcoff_rel branch November 7, 2022 03:29
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.

None yet

2 participants