macos: Create symtab
commit1320d85742bfe033ad393d56b6671de1e3aaf9dd
authorMichael Matz <matz@suse.de>
Sat, 16 May 2020 01:26:53 +0000 (16 03:26 +0200)
committerMichael Matz <matz@suse.de>
Sat, 20 Jun 2020 20:09:21 +0000 (20 22:09 +0200)
treeacde9ecf48942f39fd0e6a09ce52a5cceb86f8db
parent94066765ed761a4916713c6ad5375c48b76c4330
macos: Create symtab

this creates a proper LC_SYMTAB, with reasonable entries.  It's
not sorted, so not usable for LC_DYSYMTAB.  But 'nm -x -no-sort'
allows to see us some useful info.

This also relocates sections and symbols, so now this example
works as well (i.e. read access to static local data):

% cat simple2.c
static int loc = 42;
int main(void)
{
  return loc - 42;
}
tccmacho.c