]> granicus.if.org Git - file/commitdiff
PR/93: iaeiaeiaeiae: Do as the comment says, and count as dynamically linked
authorChristos Zoulas <christos@zoulas.com>
Tue, 23 Jul 2019 21:33:45 +0000 (21:33 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 23 Jul 2019 21:33:45 +0000 (21:33 +0000)
only the binaries that have an interpreter, not the ones that contain a
dynamic section. Fixes issue with -static-pie from gcc-9.x

src/readelf.c

index ef61d4cd600fe29a8f85771cf39daf9ed3bccc44..ac9b27556e87bb02b1f7fa1df949340833e828d1 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.165 2019/05/07 02:27:11 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.166 2019/07/23 21:33:45 christos Exp $")
 #endif
 
 #ifdef BUILTIN_ELF
@@ -1628,7 +1628,6 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
                /* Things we can determine before we seek */
                switch (xph_type) {
                case PT_DYNAMIC:
-                       linking_style = "dynamically";
                        doread = 1;
                        break;
                case PT_NOTE:
@@ -1644,6 +1643,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
                        }
                        /*FALLTHROUGH*/
                case PT_INTERP:
+                       linking_style = "dynamically";
                        doread = 1;
                        break;
                default: