Add compiler flags that prevent text relocations.
Text relocations are a minor security risk. Add compiler flags that prevent them from reappearing in Android binary. All existing occurences have been removed after http://crrev.com/17714003. TEST=Compile. BUG=b/8061013 Review URL: https://chromiumcodereview.appspot.com/17820002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@209885 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
2fea4d4068
Коммит
195fba9143
13
common.gypi
13
common.gypi
|
@ -2761,10 +2761,14 @@
|
|||
],
|
||||
'conditions' : [
|
||||
['OS=="android"', {
|
||||
# Only link with needed input sections. This is to avoid getting
|
||||
# undefined reference to __cxa_bad_typeid in the CDU library.
|
||||
'ldflags': [
|
||||
'-Wl,--fatal-warnings',
|
||||
# Only link with needed input sections. This is to avoid
|
||||
# getting undefined reference to __cxa_bad_typeid in the CDU
|
||||
# library.
|
||||
'-Wl,--gc-sections',
|
||||
# Warn in case of text relocations.
|
||||
'-Wl,--warn-shared-textrel',
|
||||
],
|
||||
}],
|
||||
['OS=="android" and android_full_debug==0', {
|
||||
|
@ -2834,6 +2838,11 @@
|
|||
'cflags': [
|
||||
'-fomit-frame-pointer',
|
||||
],
|
||||
'ldflags': [
|
||||
'-Wl,--fatal-warnings',
|
||||
# Warn in case of text relocations.
|
||||
'-Wl,--warn-shared-textrel',
|
||||
],
|
||||
}],
|
||||
['clang==1', {
|
||||
'cflags!': [
|
||||
|
|
Загрузка…
Ссылка в новой задаче