Skip to content

Conversation

@mtvec
Copy link
Contributor

@mtvec mtvec commented Sep 22, 2023

Handle the following relocations related to TLS local-exec and initial-exec:

  • R_RISCV_TLS_GOT_HI20
  • R_RISCV_TPREL_HI20
  • R_RISCV_TPREL_ADD
  • R_RISCV_TPREL_LO12_I
  • R_RISCV_TPREL_LO12_S

In addition, GNU ld has a quirk where after TLS le relaxation, two unofficial relocation types may be emitted:

  • R_RISCV_TPREL_I
  • R_RISCV_TPREL_S

Since they are unofficial (defined in the reserved range of relocation types), LLVM does not define them. Hence, I've defined them locally in BOLT in a private namespace.

@mtvec
Copy link
Contributor Author

mtvec commented Oct 4, 2023

Ping.

Handle the following relocations related to TLS local-exec and
initial-exec:
- R_RISCV_TLS_GOT_HI20
- R_RISCV_TPREL_HI20
- R_RISCV_TPREL_ADD
- R_RISCV_TPREL_LO12_I
- R_RISCV_TPREL_LO12_S

In addition, GNU ld has a quirk where after TLS le relaxation, two
unofficial relocation types may be emitted:
- R_RISCV_TPREL_I
- R_RISCV_TPREL_S

Since they are unofficial (defined in the reserved range of relocation
types), LLVM does not define them. Hence, I've defined them locally in
BOLT in a private namespace.
Copy link
Contributor

@rafaelauler rafaelauler left a comment

Choose a reason for hiding this comment

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

Thanks!

@mtvec mtvec merged commit c7d6d62 into llvm:main Oct 5, 2023
@mtvec mtvec deleted the bolt-riscv-tls branch October 10, 2023 09:38
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.

2 participants