Commit Graph

5 Commits

Author SHA1 Message Date
Lang Hames 6483c00079 [LLD] Add support for MachO ripRel32MinusNAnon relocations.
llvm-svn: 237219
2015-05-13 00:29:43 +00:00
Tim Northover 516e983dd4 [mach-o] use the addend in GOT-based relocations.
These are used to reference typeinfo data in the exception table section, for
example.

llvm-svn: 220916
2014-10-30 18:01:07 +00:00
Nick Kledzik 0e3e6155fe [mach-o] Improve x86_64 reference kind switch statements.
The use of default: was disabling the warning about unused enumerators. Fix
that, then fix the one enumerator that was not handled. Add coverage for
it in test suite.

llvm-svn: 217078
2014-09-03 21:09:24 +00:00
Nick Kledzik 2d432353ba [mach-o] implement more x86 and x86_64 relocation support
Add support for adding section relocations in -r mode.  Enhance the test
cases which validate the parsing of .o files to also round trip.  They now
write out the .o file and then parse that, verifying all relocations survived
the round trip.

llvm-svn: 213333
2014-07-17 23:16:21 +00:00
Nick Kledzik 3f69076278 [mach-o] refactor x86_64 relocation handling.
This is first step in reworking how mach-o relocations are processed.
The existing KindHandler is going to become a delgate/helper object for
processing architecture specific references.  The KindHandler knows how
to convert mach-o relocations into References and back, as well, as fixing
up the content the relocation is on.

One of the messy things about mach-o relocations is that they sometime 
come in pairs, but the pairs still convert to one lld::Reference. So, the
conversion has to detect pairs (arch specific) and change the stride.

llvm-svn: 211921
2014-06-27 18:25:01 +00:00