llvm-6502/lib/Object
Rafael Espindola 28b186f3cc Improve the --expand-relocs handling of MachO.
In a relocation target can take 3 basic forms

* A r_value in scattered relocations.
* A symbol in external relocations.
* A section is non-external relocations.

Have the dump reflect that. With this change we go from

CHECK-NEXT:       Extern: 0
CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
CHECK-NEXT:       Symbol: 0x2
CHECK-NEXT:       Scattered: 0

To just

// CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
// CHECK-NEXT:       Section: __data (2)

Since the relocation is with a section, we print the seciton name and don't
need to say that it is not scattered or external.

Someone motivated can add further special cases for things like
ARM64_RELOC_ADDEND and ARM_RELOC_PAIR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:38:20 +00:00
..
Archive.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
ArchiveWriter.cpp [ArchiveWriter] Use EndianStream. No functional change intended. 2015-06-17 16:02:56 +00:00
Binary.cpp Object: Handle Mach-O kext bundle files 2015-02-25 22:59:20 +00:00
CMakeLists.txt modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
COFFObjectFile.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
COFFYAML.cpp obj2yaml, yaml2obj: Add support for COFF executables 2014-11-14 08:15:42 +00:00
ELF.cpp Remove duplication of relocation names in lib/Object/ELF.cpp 2014-11-21 20:16:07 +00:00
ELFObjectFile.cpp [Object, ELF] Don't assert on invalid magic in createELFObjectFile. 2015-06-04 23:14:43 +00:00
ELFYAML.cpp [llvm-readobj/obj2yaml/yaml2obj] Support MIPS machine ELF header flags 2015-05-08 07:04:59 +00:00
Error.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
IRObjectFile.cpp Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LLVMBuild.txt
MachOObjectFile.cpp Improve the --expand-relocs handling of MachO. 2015-06-18 22:38:20 +00:00
MachOUniversal.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
Makefile
Object.cpp Move to llvm-objdump a large amount of code to that is only used there. 2015-06-03 04:48:06 +00:00
ObjectFile.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
RecordStreamer.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
RecordStreamer.h Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
SymbolicFile.cpp Object: Handle Mach-O kext bundle files 2015-02-25 22:59:20 +00:00