This didn't work correctly for two reasons:
- The symbols were being marked as undefined (imported) rather than
exported. I could fix that by adding an initializer (= {0}), but then
the binary gets huge; not sure if there's a way around that.
- Mach-O binaries don't store symbol sizes. You can get nm to try to
calculate them with --size-sort, but I'm not sure if this will always
output the correct result.
In lieu of more complicated platform-specific fixes, I switched to an
approach that renders the value as hex, allowing the object file to be
piped directly to awk on all platforms.