MachO: calculate segment offsets in final MachO files properly.
authorTim Northover <tnorthover@apple.com>
Mon, 30 Jun 2014 09:49:30 +0000 (09:49 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 30 Jun 2014 09:49:30 +0000 (09:49 +0000)
commit08d6a7bfef5ab69a9c85512727b26d0b6d3d9d55
treef694bf700aec145ad9ff1973d88f12eeda4633a5
parent7650a9b8713e6f23495d558bb8c72e3f3c13a42b
MachO: calculate segment offsets in final MachO files properly.

Because of how we were calculating fileOffset and fileSize for segments, most
ended up at a single offset in a finalised MachO file. This meant the data
often didn't even get written in the final object, let alone where it would be
useful.

llvm-svn: 212030
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/test/mach-o/exe-offsets.yaml [new file with mode: 0644]