Linking 64-bit SMP object files using the ld command

To use the ld command to link a 64-bit SMP program, follow these guidelines:
For example, to link the object files smpfile1.o and smpfile2.o, you could specify the following:
ld -bh:4 -bpT:0x100000000 -bpD:0x110000000 -b64 /lib/crt0_64.o -lxlf90
   -lxlsmp -lm -lc -lpthreads smpfile1.o smpfile2.o

The configuration file /opt/IBM/xlf/15.1.0/etc/xlf.cfg lists these default libraries and linker options. By doing a sample compilation with the -# option, you can see exactly how the compiler would run the linker.

See the AIX® Commands Reference, Volumes 1 - 6 for a description of the linker options.