Hmm, my deps should work out, but this example does not work on latest Ubuntu (24.04.1 LTS)
gcc-13 -fPIE -fcf-protection -o test-cet test-cet.c
/usr/bin/ld: /tmp/ccoGNpLf.o: relocation R_X86_64_32S against symbol `hello'
can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
because RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
0000000000000007 R_X86_64_PC32 .rodata-0x0000000000000004
000000000000000f R_X86_64_PLT32 puts-0x0000000000000004
000000000000001d R_X86_64_32S hello
It however worked as expected on Fedora Core 40.