[arm64] Mark embedded builtins as supporting BTI

Use the recently added -mmark-bti-property Clang flag to add
GNU_PROPERTY_AARCH64_FEATURE_1_BTI to the ELF GNU program properties.

Bug: v8:10026
Change-Id: Id35a60c9f5a8b3019313d56a142ab8f481e095a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543934
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#71240}
This commit is contained in:
Georgia Kouveli 2020-11-17 11:58:44 +00:00 committed by Commit Bot
parent 3d6169c61b
commit 6d10bcb711
2 changed files with 2 additions and 3 deletions

View File

@ -721,6 +721,7 @@ config("toolchain") {
# TODO(v8:10026): Enable this in src/build.
if (current_cpu == "arm64") {
cflags += [ "-mbranch-protection=standard" ]
asmflags = [ "-mmark-bti-property" ]
}
}
}

View File

@ -124,9 +124,7 @@ void PlatformEmbeddedFileWriterGeneric::DeclareFunctionBegin(const char* name,
void PlatformEmbeddedFileWriterGeneric::DeclareFunctionEnd(const char* name) {}
void PlatformEmbeddedFileWriterGeneric::FilePrologue() {
// TODO(v8:10026): Add ELF note required for BTI.
}
void PlatformEmbeddedFileWriterGeneric::FilePrologue() {}
void PlatformEmbeddedFileWriterGeneric::DeclareExternalFilename(
int fileid, const char* filename) {