summaryrefslogtreecommitdiff
path: root/mkspecs
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-11-23 17:32:50 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-04 21:27:20 +0100
commitc74b83d9baca9210588f7ee107e10f2dffffdc73 (patch)
tree07bc0ead539bf738fd88806c1ec9dcc4134023d4 /mkspecs
parente5e5238a7c6a8188166119111a57a81d272aa28d (diff)
downloadqt4-tools-c74b83d9baca9210588f7ee107e10f2dffffdc73.tar.gz
BlackBerry mkspecs: optimize linker flags
* relro makes some sections read-only before giving control to the program; * now resolves all symbols when the program is started and allows for the GOT being marked read-only to prevent it from being overwritten. These settings have been used internally for device builds already. Change-Id: I03576d4fd1585ad566865e2a7a0341b3e13c3b06 (cherry picked from commit c8c8e1990ce74590739bd52874e38e03e3d64825) Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/blackberry-armv7le-qcc/qmake.conf2
-rw-r--r--mkspecs/blackberry-x86-qcc/qmake.conf2
2 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/blackberry-armv7le-qcc/qmake.conf b/mkspecs/blackberry-armv7le-qcc/qmake.conf
index 98daef194d..44ea96733e 100644
--- a/mkspecs/blackberry-armv7le-qcc/qmake.conf
+++ b/mkspecs/blackberry-armv7le-qcc/qmake.conf
@@ -21,3 +21,5 @@ contains(QT_CONFIG, stack-protector-strong) {
QMAKE_CFLAGS += -mcpu=cortex-a9
QMAKE_CXXFLAGS += -mcpu=cortex-a9
+
+QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
diff --git a/mkspecs/blackberry-x86-qcc/qmake.conf b/mkspecs/blackberry-x86-qcc/qmake.conf
index 26bf509722..fe3389375f 100644
--- a/mkspecs/blackberry-x86-qcc/qmake.conf
+++ b/mkspecs/blackberry-x86-qcc/qmake.conf
@@ -18,3 +18,5 @@ contains(QT_CONFIG, stack-protector-strong) {
QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all
}
+
+QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now