macos: handle undefined symbols a bit
commitd82e64c163fdcf454352339002db11bc26dcda55
authorMichael Matz <matz@suse.de>
Sun, 17 May 2020 03:36:00 +0000 (17 05:36 +0200)
committerMichael Matz <matz@suse.de>
Sat, 20 Jun 2020 20:12:02 +0000 (20 22:12 +0200)
tree92f23d33548e72818afd931640b9eb70fd816c46
parentfab8787b23643f108eec81add8252b3d65582590
macos: handle undefined symbols a bit

at least data symbols coming from dylibs can be used now, as in the
below.  Note in the example that optind is defined in libc (really in
libsystem_c.dylib, reexported from libSystem.B.dylib):

static int loc;
extern int _optind;
int _start(void)
{
  _optind = 0;
  loc = 42 + _optind;
  return loc - 42;
}
tccmacho.c