Trusted Contributor Trusted Contributor
Re: Compiling with CC
Probably missing crt0.o. For example,

$ ld myobj.o -lc
ld: Unsatisfied symbols:
$global$ (data)

$ ld myobj.o /opt/langtools/lib/crt0.o -lc

ld man page explains:

Code and data from shared libraries is never copied into an executable
program. The dynamic loader /usr/lib/ is invoked at startup
time by the startup file crt0.o if a program uses shared libraries.
Identical copies of crt0.o can be found in either /usr/ccs/lib/crt0.o
or /opt/langtools/lib/crt0.o.