This diff adds support for weak definitions, though it doesn't handle weak
symbols in dylibs quite correctly -- we need to emit binding opcodes for them
in the weak binding section rather than the lazy binding section.
What *is* covered in this diff:
- Reading the weak flag from symbol table / export trie, and writing it to the export trie
- Refining the symbol table's rules for choosing one symbol definition over another. Wrote a few dozen test cases to make sure we were matching ld64's behavior.
We can now link basic C++ programs.
Are we sure we wont need any other flags? I wonder if it's better to just treat weakness as a flag. IIRC, there is a EXPORT_SYMBOL_FLAGS_REEXPORT and EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL that would be fairly good to account for.