Search notes:

gcc -Wl,linker-option

gcc -Wl,-option passes the linker specific option -option to the linker.

prog.c

I am going to compile and link the following simple program:
#include <stdio.h>

int main() {
    return 0;
}
Github repository about-gcc, path: /options/Wl/prog.c

Makefile

When I link the program, we want to pass the -t flag to the linker so that it traces the names of the input files that the linker processes.
This can be achieved by invoking gcc with -Wl,-t:
a.out: prog.o
	@gcc -Wl,-t $^ -o $@

prog.o: prog.c
	@gcc -c $< -o $@
Github repository about-gcc, path: /options/Wl/Makefile

Output

The output of the -t option on my machine is:
/usr/bin/ld: mode elf_x86_64
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o
prog.o
libgcc_s.so.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/libgcc_s.so.1)
/usr/lib/libc.so.6
(/usr/lib/libc_nonshared.a)elf-init.oS
/usr/lib/ld-linux-x86-64.so.2
/usr/lib/ld-linux-x86-64.so.2
libgcc_s.so.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/libgcc_s.so.1)
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o

See also

GCC options

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...', 1759390693, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-C-plus-plus/GCC/options/Wl/index(79): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78