macos: dynamic symbol table and __got
macos: dynamic symbol table and __got

this now sorts the symbols properly (local, global defined, undefined;
the latter two by name), marks the three ranges within LC_DYSYMTAB,
generates a __got section (non-lazy pointers) and slots for
relocations which need them, and the indirect symbol mapping for
them.

This doesn't yet deal with undefined symbols.  But it means compared to
last example now this also works, i.e. read access to _global_ data:

% cat simple3.c
int loc = 42;
int _start(void)
{
  return loc - 42;
}

mirror/tinycc,mirror/tinycc,mingodad/tinycc,mirror/tinycc,mingodad/tinycc,mirror/tinycc,mingodad/tinycc,mingodad/tinycc