Skip to content

Commit

Permalink
Rollup merge of #89880 - adamgemmell:dev/nc-relocation, r=Amanieu
Browse files Browse the repository at this point in the history
Use non-checking TLS relocation in aarch64 asm! sym test.

The checking variant ensures that the offset required is not larger than 12 bits - hence we wouldn't ever need the upper 12 bits.

It's unlikely to ever fail in this small test but this is technically correct.

This was noticed incidentally when we found that LLD doesn't support the `tprel_lo12` relocation, even though LLVM can apparently generate it when using `-mtls-size=12`.
  • Loading branch information
matthiaskrgr committed Oct 15, 2021
2 parents e2c28ad + af5b146 commit f0555ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/ui/asm/aarch64/sym.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ macro_rules! static_tls_addr {
// Add the top 12 bits of the symbol's offset
"add {out}, {out}, :tprel_hi12:{sym}",
// And the bottom 12 bits
"add {out}, {out}, :tprel_lo12:{sym}",
"add {out}, {out}, :tprel_lo12_nc:{sym}",
out = out(reg) result,
sym = sym $s
);
Expand Down

0 comments on commit f0555ce

Please sign in to comment.