Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

R_PPC_REL24 relocation question for understanding #576

@tyler87898

Description

@tyler87898

Question

cle/backends/elf/relocation/ppc.py

Lines 212-213: Not questioning your code, just trying to understand how these relocations work.

I know the PPC ELF spec says the formula for this reloc type is (S + A - P) >> 2. So how do you know/why do you need to left shift it by 2 on the next line? It seems like undoing what was just done

Similar question applies to ppc64.py in class R_PPC64_REL24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions