Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22066

`file`, why executables not reported as executables?

$
0
0

In GNU/Linux Debian 9.9 (stretch) my program is reported as:

build/debug/program_g:              ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=be082fb3..., not strippedbuild/debug/stripped_program_g:     ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=be082fb3..., strippedbuild/release/program:              ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=6477469..., strippedbuild/release/program_not_stripped: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=6477469..., not stripped

Compiler is GCC (vanilla distro's i.e. gcc (Debian 6.3.0-18+deb9u1) 6.3.0 2017051), flags are for "release":

 -ansi -pedantic -Wall -Wextra -Werror -Wunused-result -Wmissing-include-dirs  -Wparentheses -std=c89 -DPROGRAM_USE_STD_C89 -O2 -DNDEBUG

For "debug":

 -ansi -pedantic -Wall -Wextra -Werror -Wunused-result -Wmissing-include-dirs  -Wparentheses -std=c89 -DPROGRAM_USE_STD_C89 -O0 -g -fprofile-arcs -ftest-coverage -DTRACE_U0 -DTRACE_U1 -no-pie

Question is why for "release" the executable is reported as shared objectinstead of executable?


Viewing all articles
Browse latest Browse all 22066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>