From: guenther Date: Sat, 25 Dec 2021 01:25:51 +0000 (+0000) Subject: Sync DF_1_* flag definitions with llvm 13, including support in X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=66c5d4ea8bf9d2b9109c529b2b1ae50997618090;p=openbsd Sync DF_1_* flag definitions with llvm 13, including support in readelf -d for displaying them. (lld 13 sets DF_1_PIE on most our binaries) ok jsg@ --- diff --git a/gnu/usr.bin/binutils-2.17/binutils/readelf.c b/gnu/usr.bin/binutils-2.17/binutils/readelf.c index df2bd1b7d26..716b2768e2e 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/readelf.c +++ b/gnu/usr.bin/binutils-2.17/binutils/readelf.c @@ -6425,6 +6425,71 @@ process_dynamic_section (FILE *file) printf (" CONLFAT"); val ^= DF_1_CONLFAT; } + if (val & DF_1_ENDFILTEE) + { + printf (" ENDFILTEE"); + val ^= DF_1_ENDFILTEE; + } + if (val & DF_1_DISPRELDNE) + { + printf (" DISPRELDNE"); + val ^= DF_1_DISPRELDNE; + } + if (val & DF_1_DISPRELPND) + { + printf (" DISPRELPND"); + val ^= DF_1_DISPRELPND; + } + if (val & DF_1_NODIRECT) + { + printf (" NODIRECT"); + val ^= DF_1_NODIRECT; + } + if (val & DF_1_IGNMULDEF) + { + printf (" IGNMULDEF"); + val ^= DF_1_IGNMULDEF; + } + if (val & DF_1_NOKSYMS) + { + printf (" NOKSYMS"); + val ^= DF_1_NOKSYMS; + } + if (val & DF_1_NOHDR) + { + printf (" NOHDR"); + val ^= DF_1_NOHDR; + } + if (val & DF_1_EDITED) + { + printf (" EDITED"); + val ^= DF_1_EDITED; + } + if (val & DF_1_NORELOC) + { + printf (" NORELOC"); + val ^= DF_1_NORELOC; + } + if (val & DF_1_SYMINTPOSE) + { + printf (" SYMINTPOSE"); + val ^= DF_1_SYMINTPOSE; + } + if (val & DF_1_GLOBAUDIT) + { + printf (" GLOBAUDIT"); + val ^= DF_1_GLOBAUDIT; + } + if (val & DF_1_SINGLETON) + { + printf (" SINGLETON"); + val ^= DF_1_SINGLETON; + } + if (val & DF_1_PIE) + { + printf (" PIE"); + val ^= DF_1_PIE; + } if (val != 0) printf (" %lx", val); puts (""); diff --git a/gnu/usr.bin/binutils-2.17/include/elf/common.h b/gnu/usr.bin/binutils-2.17/include/elf/common.h index 4ac70f764a1..1e535ef0b2d 100644 --- a/gnu/usr.bin/binutils-2.17/include/elf/common.h +++ b/gnu/usr.bin/binutils-2.17/include/elf/common.h @@ -669,6 +669,19 @@ #define DF_1_NODEFLIB 0x00000800 #define DF_1_NODUMP 0x00001000 #define DF_1_CONLFAT 0x00002000 +#define DF_1_ENDFILTEE 0x00004000 +#define DF_1_DISPRELDNE 0x00008000 +#define DF_1_DISPRELPND 0x00010000 +#define DF_1_NODIRECT 0x00020000 +#define DF_1_IGNMULDEF 0x00040000 +#define DF_1_NOKSYMS 0x00080000 +#define DF_1_NOHDR 0x00100000 +#define DF_1_EDITED 0x00200000 +#define DF_1_NORELOC 0x00400000 +#define DF_1_SYMINTPOSE 0x00800000 +#define DF_1_GLOBAUDIT 0x01000000 +#define DF_1_SINGLETON 0x02000000 +#define DF_1_PIE 0x08000000 /* Flag values for the DT_FLAGS entry. */ #define DF_ORIGIN (1 << 0) diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index 9f7f397a098..8083ae3b540 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.h,v 1.93 2021/12/07 22:17:03 guenther Exp $ */ +/* $OpenBSD: exec_elf.h,v 1.94 2021/12/25 01:25:51 guenther Exp $ */ /* * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved. * @@ -576,6 +576,19 @@ typedef struct { #define DF_1_NODEFLIB 0x00000800 #define DF_1_NODUMP 0x00001000 #define DF_1_CONLFAT 0x00002000 +#define DF_1_ENDFILTEE 0x00004000 +#define DF_1_DISPRELDNE 0x00008000 +#define DF_1_DISPRELPND 0x00010000 +#define DF_1_NODIRECT 0x00020000 +#define DF_1_IGNMULDEF 0x00040000 +#define DF_1_NOKSYMS 0x00080000 +#define DF_1_NOHDR 0x00100000 +#define DF_1_EDITED 0x00200000 +#define DF_1_NORELOC 0x00400000 +#define DF_1_SYMINTPOSE 0x00800000 +#define DF_1_GLOBAUDIT 0x01000000 +#define DF_1_SINGLETON 0x02000000 +#define DF_1_PIE 0x08000000 /* * Note header