Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2023 16:32:51 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6611fe011f79 - stable/13 - libicp: Link with -z noexecstack for ld.bfd.
Message-ID:  <202303221632.32MGWpuo024004@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=6611fe011f79602cc13000e46acd7c4c76c7a08f

commit 6611fe011f79602cc13000e46acd7c4c76c7a08f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-22 16:37:12 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-22 15:22:06 +0000

    libicp: Link with -z noexecstack for ld.bfd.
    
    The assembly source files do not contain GNU-stack annotations, so
    ld.bfd defaults to using an executable stack.
    
    (cherry picked from commit 7e3e70ce214d042e202828b0665904840928a002)
---
 cddl/lib/libicp/Makefile        | 2 ++
 cddl/lib/libicp_rescue/Makefile | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index 6c0d73561818..f65d01593b12 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -94,4 +94,6 @@ CFLAGS.ghash-x86_64.S+= -DLOCORE
 CFLAGS.sha256_impl.S+= -DLOCORE
 CFLAGS.sha512_impl.S+= -DLOCORE
 
+LDFLAGS.bfd+= -Wl,-znoexecstack
+
 .include <bsd.lib.mk>
diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile
index 342afd2556cc..c5faae6aba58 100644
--- a/cddl/lib/libicp_rescue/Makefile
+++ b/cddl/lib/libicp_rescue/Makefile
@@ -92,4 +92,6 @@ CFLAGS.sha256_impl.S+= -DLOCORE
 CFLAGS.sha512_impl.S+= -DLOCORE
 CFLAGS.gcm.c+= -UCAN_USE_GCM_ASM
 
+LDFLAGS.bfd+= -Wl,-znoexecstack
+
 .include <bsd.lib.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303221632.32MGWpuo024004>