lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190211193008.24101-4-ndesaulniers@google.com>
Date:   Mon, 11 Feb 2019 11:30:06 -0800
From:   ndesaulniers@...gle.com
To:     yamada.masahiro@...ionext.com
Cc:     natechancellor@...il.com, sedat.dilek@...il.com,
        keescook@...omium.org, samitolvanen@...gle.com,
        michal.lkml@...kovi.net, akpm@...ux-foundation.org,
        hannes@...xchg.org, peterz@...radead.org,
        linux@...inikbrodowski.net, npiggin@...il.com,
        mathieu.desnoyers@...icios.com, gor@...ux.ibm.com, adrian@...as.de,
        rgb@...hat.com, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Rui Ueyama <ruiu@...gle.com>
Subject: [PATCH v2 4/4] Makefile: lld: set -O2 linker flag when linking with LLD

For arm64:
0.34% size improvement with lld -O2 over lld for vmlinux.
3.3% size improvement with lld -O2 over lld for Image.lz4-dtb.

Link: https://github.com/ClangBuiltLinux/linux/issues/343
Suggested-by: Rui Ueyama <ruiu@...gle.com>
Suggested-by: Nathan Chancellor <natechancellor@...il.com>
Reviewed-by: Nathan Chancellor <natechancellor@...il.com>
Tested-by: Nathan Chancellor <natechancellor@...il.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
Changes V1->V2:
* add tested and reviewed by tags.

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 00e8e01d23fc..8011555745aa 100644
--- a/Makefile
+++ b/Makefile
@@ -718,6 +718,10 @@ else
 KBUILD_CFLAGS += -Wno-unused-but-set-variable
 endif
 
+ifdef CONFIG_LD_IS_LLD
+KBUILD_LDFLAGS += -O2
+endif
+
 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
 ifdef CONFIG_FRAME_POINTER
 KBUILD_CFLAGS	+= -fno-omit-frame-pointer -fno-optimize-sibling-calls
-- 
2.20.1.791.gb4d0f1c61a-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ