Commit eaa769be authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Disable cfi-icall for generated stubs

The generated stubs use dlsym()ed functions, so must not be instrumented
with CFI-icall.

BUG=1136413
R=sky

Change-Id: I698e6b3ed96349a2bb477767d54aeb9b3ad9096f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462216
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815379}
parent 346c7793
......@@ -92,6 +92,7 @@ FILE_TYPE_WIN_DEF = 'windows_def'
# arg_list: The arguments used to call the stub function.
STUB_FUNCTION_DEFINITION = (
"""extern %(return_type)s %(name)s(%(params)s) __attribute__((weak));
DISABLE_CFI_ICALL
%(return_type)s %(export)s %(name)s(%(params)s) {
%(return_prefix)s%(name)s_ptr(%(arg_list)s);
}""")
......@@ -110,6 +111,7 @@ STUB_FUNCTION_DEFINITION = (
# argument.
VARIADIC_STUB_FUNCTION_DEFINITION = (
"""extern %(return_type)s %(name)s(%(params)s) __attribute__((weak));
DISABLE_CFI_ICALL
%(return_type)s %(export)s %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
......@@ -131,6 +133,7 @@ VARIADIC_STUB_FUNCTION_DEFINITION = (
# argument.
VOID_VARIADIC_STUB_FUNCTION_DEFINITION = (
"""extern void %(name)s(%(params)s) __attribute__((weak));
DISABLE_CFI_ICALL
void %(export)s %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
......@@ -179,6 +182,8 @@ IMPLEMENTATION_PREAMBLE = """// This is generated file. Do not modify directly.
#include <map>
#include <vector>
#include "base/compiler_specific.h"
"""
# The start and end templates for the enum definitions used by the Umbrella
......
......@@ -84,6 +84,10 @@ template("generate_stubs") {
"public_deps",
"visibility",
])
if (!defined(deps)) {
deps = []
}
deps += [ "//base" ]
if (!defined(public_deps)) {
public_deps = []
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment