~motumedia/libav/master

Viewing all changes in revision 45233.

  • Committer: Martin Storsjö
  • Author(s): Peter Collingbourne
  • Date: 2019-08-21 19:31:27 UTC
  • Revision ID: git-v1:e5afa1b556542fd7a52a0a9b409c80f2e6e1e9bb
aarch64: Add assembly support for -fsanitize=hwaddress tagged globals.

As of LLVM r368102, Clang will set a pointer tag in bits 56-63 of the
address of a global when compiling with -fsanitize=hwaddress. This requires
an adjustment to assembly code that takes the address of such globals: the
code cannot use the regular R_AARCH64_ADR_PREL_PG_HI21 relocation to refer
to the global, since the tag would take the address out of range. Instead,
the code must use the non-checking (_NC) variant of the relocation (the
link-time check is substituted by a runtime check).

This change makes the necessary adjustment in the movrel macro, where it is
needed when compiling with -fsanitize=hwaddress.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Martin Storsjö <martin@martin.st>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: