Hi,

Is the following expected behaviour?

$ gcc -static -Wl,-nopie -Wl,-v -o foo foo.c

collect2 version 4.2.1 20070719  (OpenBSD/x86-64 ELF)
/usr/bin/ld -e __start -Bstatic -dynamic-linker /usr/libexec/ld.so -o foo
/usr/lib/rcrt0.o /usr/lib/crtbegin.o
-L/usr/lib/gcc-lib/amd64-unknown-openbsd6.1/4.2.1 -nopie -v
/tmp//ccZ7VS0V.o -lgcc -lc -lgcc /usr/lib/crtend.o
GNU ld version 2.17
/usr/lib/rcrt0.o: In function `__start':
(.text+0x1a): undefined reference to `_DYNAMIC'
collect2: ld returned 1 exit status


I was
​expecting the -Wl,-nopie option to cause it to link against crt0.o but
instead it seems to try to link against rcrt0.o but fails.

This was using 6.1-release.

-- 
Charles

Reply via email to