Commit Graph

6 Commits

Author SHA1 Message Date
Nick Kledzik b072c3673a [mach-o] zero-fill sections have no file offset
In mach-o, sections of type S_ZEROFILL are special cased and to always have
their section.offset field be zero.

llvm-svn: 222202
2014-11-18 00:30:29 +00:00
Nick Kledzik 37d1aa715a [mach-o] remove extra leading underscore on __bss and __got
llvm-svn: 221425
2014-11-06 01:14:12 +00:00
Nick Kledzik 761d6549bc [mach-o] Support data-only dylibs
In final linked shared images, the __TEXT segment contains both code and
the mach-o header/load-commands.  In the case of a data-only dylib, there is
no code, so we need to force the addition of the __TEXT segment.

llvm-svn: 220597
2014-10-24 22:19:22 +00:00
Tim Northover cf78d37fd6 [mach-o] create __unwind_info section on x86_64
This is a minimally useful pass to construct the __unwind_info section in a
final object from the various __compact_unwind inputs. Currently it doesn't
produce any compressed pages, only works for x86_64 and will fail if any
function ends up without __compact_unwind.

rdar://problem/18208653

llvm-svn: 218703
2014-09-30 21:29:54 +00:00
Nick Kledzik 2458bec7e7 [mach-o] refactor KindHandler into ArchHandler and simplify passes.
All architecture specific handling is now done in the appropriate
ArchHandler subclass.

The StubsPass and GOTPass have been simplified.  All architecture specific
variations in stubs are now encoded in a table which is vended by the
current ArchHandler.

llvm-svn: 213187
2014-07-16 19:49:02 +00:00
Tim Northover 08d6a7bfef 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
2014-06-30 09:49:30 +00:00