Search notes:

readelf

readelf -w dumps all DWARF data (compare with gcc -g).

Deteremine GCC compiler version

readelf -p .comment obj|prog can be used to determine with which GCC compiler version a program was compiled with:
$ echo 'void f() {}' | gcc -xc -c -o f.obj -
$ readelf -p .comment f.obj

String dump of section '.comment':
  [     1]  GCC: (Debian 10.2.1-6) 10.2.1 20210110

$ gcc --version | head -1
gcc (Debian 10.2.1-6) 10.2.1 20210110
Alternatively, the .comment section can also be read with objdump:
$ -s -j .comment f.obj

f.obj:     file format elf64-x86-64

Contents of section .comment:
 0000 00474343 3a202844 65626961 6e203130  .GCC: (Debian 10
 0010 2e322e31 2d362920 31302e32 2e312032  .2.1-6) 10.2.1 2
 0020 30323130 31313000                    0210110.

See also

readelf

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758201038, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/GNU/toolchain/binutils/readelf/index(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78