llvm-project/lld/MachO
Jez Ng 53c796b948 [lld-macho] Properly handle & validate relocation r_length
Summary:
We should be reading / writing our addends / relocated addresses based on
r_length, and not just based on the type of the relocation. But since only
some r_length values are valid for a given reloc type, I've also added some
validation.

ld64 has code to allow for r_length = 0 in X86_64_RELOC_BRANCH relocs, but I'm
not sure how to create such a relocation...

Reviewed By: smeenai

Differential Revision: https://reviews.llvm.org/D80854
2020-06-14 16:35:23 -07:00
..
Arch [lld-macho] Properly handle & validate relocation r_length 2020-06-14 16:35:23 -07:00
CMakeLists.txt [lld] Fix shared library build by adding the missing dependency. 2020-06-08 16:12:58 -04:00
Config.h lld: improve the `-arch` handling for MachO 2020-06-08 11:04:19 -07:00
Driver.cpp [lld-macho] No need to explicitly specify -arch in tests 2020-06-14 16:35:21 -07:00
Driver.h Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
ExportTrie.cpp [lld-macho] Use export trie instead of symtab when linking against dylibs 2020-05-09 20:56:22 -07:00
ExportTrie.h [lld-macho] Use export trie instead of symtab when linking against dylibs 2020-05-09 20:56:22 -07:00
InputFiles.cpp [lld-macho] Properly handle & validate relocation r_length 2020-06-14 16:35:23 -07:00
InputFiles.h lld: initial pass at supporting TBD 2020-06-08 18:15:40 -07:00
InputSection.cpp [lld-macho] Properly handle & validate relocation r_length 2020-06-14 16:35:23 -07:00
InputSection.h [lld-macho] Properly handle & validate relocation r_length 2020-06-14 16:35:23 -07:00
MachOStructs.h [lld-macho] Ensure reads from nlist_64 structs are aligned when necessary 2020-06-02 13:19:38 -07:00
MergedOutputSection.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
MergedOutputSection.h [lld-macho] Support -order_file 2020-05-19 07:46:57 -07:00
Options.td lld: ignore the `-search_paths_first` option on MachO 2020-06-03 15:36:35 +00:00
OutputSection.cpp [lld] Merge Mach-O input sections 2020-05-01 16:57:18 -07:00
OutputSection.h [lld-macho] Support -order_file 2020-05-19 07:46:57 -07:00
OutputSegment.cpp [lld-macho] Support -order_file 2020-05-19 07:46:57 -07:00
OutputSegment.h [lld-macho] Support -order_file 2020-05-19 07:46:57 -07:00
SymbolTable.cpp [lld] Add archive file support to Mach-O backend 2020-05-14 12:58:35 -07:00
SymbolTable.h [lld] Add archive file support to Mach-O backend 2020-05-14 12:58:35 -07:00
Symbols.cpp [lld-macho] Set __PAGEZERO size to 4GB 2020-06-02 13:19:38 -07:00
Symbols.h [lld-macho] Set __PAGEZERO size to 4GB 2020-06-02 13:19:38 -07:00
SyntheticSections.cpp [lld-macho] Ensure reads from nlist_64 structs are aligned when necessary 2020-06-02 13:19:38 -07:00
SyntheticSections.h [lld-macho] Set __PAGEZERO size to 4GB 2020-06-02 13:19:38 -07:00
Target.cpp Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
Target.h [lld-macho] Properly handle & validate relocation r_length 2020-06-14 16:35:23 -07:00
Writer.cpp lld: initial pass at supporting TBD 2020-06-08 18:15:40 -07:00
Writer.h [lld-macho] Extend SyntheticSections to cover all segment load commands 2020-04-27 12:58:12 -07:00