pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/check Don't complain if binaries without an interpr...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fdd13d0281db
branches: trunk
changeset: 322572:fdd13d0281db
user: maya <maya%pkgsrc.org@localhost>
date: Wed Apr 24 22:56:47 2019 +0000
description:
Don't complain if binaries without an interpreter or .dynamic section don't
have a GNU_RELRO flag. (they won't because it doesn't do anything to them).
Should eliminate some of the need for CHECK_RELRO_SKIP, especially for some
Go binaries.
diffstat:
mk/check/check-relro-elf.awk | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 404633287b86 -r fdd13d0281db mk/check/check-relro-elf.awk
--- a/mk/check/check-relro-elf.awk Wed Apr 24 19:35:27 2019 +0000
+++ b/mk/check/check-relro-elf.awk Wed Apr 24 22:56:47 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-relro-elf.awk,v 1.2 2017/07/05 15:24:22 khorben Exp $
+# $NetBSD: check-relro-elf.awk,v 1.3 2019/04/24 22:56:47 maya Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
# Copyright (c) 2017 Pierre Pronchery <khorben%NetBSD.org@localhost>.
@@ -76,9 +76,16 @@
if ($1 == "GNU_RELRO") {
got_relro = 1
}
+ # PT_INTERP for executables
+ # DYNAMIC for libraries, executables
+ if (($1 == "INTERP") ||
+ ($1 == "DYNAMIC")) {
+ dynamic = 1
+ }
+
}
close(cmd)
- if (found == 1 && got_relro != 1) {
+ if (found == 1 && dynamic == 1 && got_relro != 1) {
print ELF ": missing RELRO"
}
}
Home |
Main Index |
Thread Index |
Old Index