summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator/make_header.py
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2019-08-07 17:15:24 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2019-08-09 02:25:29 +0000
commit918e9af6a7259e7178ec10257f568a60e832a962 (patch)
tree1f56177ca84debc27f942db38821d7eae10a4985 /tools/cpp-define-generator/make_header.py
parentc94b44cee8376b86da85c2452e74edfe5ad4b2cf (diff)
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 all of the places where it is needed when compiling with -fsanitize=hwaddress. The __clang_major__ >= 10 is temporary (required because prebuilt Clang doesn't support :pg_hi21_nc:) and we should be able to remove it once we update Clang past r368102. Test: walleye_hwasan-userdebug boots Change-Id: Ide7f513baac42fdeb637e95a7f7c1c083441884d
Diffstat (limited to 'tools/cpp-define-generator/make_header.py')
0 files changed, 0 insertions, 0 deletions