On Monday, 4 December 2017 at 01:01:47 UTC, Michael V. Franklin
wrote:
.$> dmd -defaultlib= -debuglib= -conf= main.d -of=main
/usr/bin/ld: main.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on
output
I didn't compile with -shared. What's going on here?
.$> dmd -defaultlib= -debuglib= -conf= main.d -of=main -fPIC
main.o:(.text.d_dso_init[.data.d_dso_rec]+0x22): undefined
reference to `_d_dso_registry'
Again, not sure why the compiler's generated code for that?
Ok, well perhaps that makes sense compiling with -fPIC, but the
"relocation R_X86_64_32 against `.rodata.str1.1'" seems
unnecessary.
Mike