llvm/lld/MachO
Nico Weber 9721197520 [lld/mac] Set branchRange a bit more carefully
- Don't subtract thunkSize from branchRange. Most places care about
  the actual maximal branch range. Subtract thunkSize in the one place
  that wants to leave room for a thunk.
- Set it to 0x800_0000 instead of 0xFF_FFFF
- Subtract 4 for the positive branch direction since it's a
  two's complement 24bit number sign-extended mutiplied by 4,
  so its range is -0x800_0000..+0x7FF_FFFC
- Make boundary checks include the boundary values

This doesn't make a huge difference in practice. It's preparation
for a "real" fix for PR51578 -- but it also lets the repro in comment 0
in that bug place one more thunk before hitting the TODO.

Differential Revision: https://reviews.llvm.org/D108897
2021-08-30 12:36:06 -04:00
..
Arch [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
CMakeLists.txt [CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO 2021-08-04 18:52:41 -07:00
ConcatOutputSection.cpp [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
ConcatOutputSection.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00
Config.h [lld/mac] Handle symbols from -U in treatUndefinedSymbol() 2021-07-22 19:43:57 -04:00
Driver.cpp [lld-macho] Have -ObjC load archive members before symbol resolution 2021-08-26 18:52:07 -04:00
Driver.h [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
DriverUtils.cpp [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
Dwarf.cpp [lld-macho] Factor out common InputSection members 2021-07-01 21:22:39 -04:00
Dwarf.h
ExportTrie.cpp
ExportTrie.h
ICF.cpp [lld-macho] ICF: Do more work in equalsConstant, less in equalsVariable 2021-07-23 11:49:00 -04:00
ICF.h [lld-macho] Move ICF earlier to avoid emitting redundant binds 2021-07-01 21:22:38 -04:00
InputFiles.cpp [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
InputFiles.h [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
InputSection.cpp [lld/mac] Remove "else" after return 2021-07-22 21:31:52 -04:00
InputSection.h [lld-macho][nfc] Clean up InputSection constructors 2021-08-26 19:07:48 -04:00
LTO.cpp [lld-macho] Add LTO cache support 2021-07-15 12:56:13 -04:00
LTO.h [lld-macho] Add LTO cache support 2021-07-15 12:56:13 -04:00
MachOStructs.h
MapFile.cpp [lld][MachO] Sort symbols in parallel in -map 2021-06-17 10:19:59 +08:00
MapFile.h
MarkLive.cpp [lld/mac] Partially implement -export_dynamic 2021-07-06 11:22:18 -04:00
MarkLive.h [lld/mac] Implement -dead_strip 2021-06-02 11:09:26 -04:00
ObjC.cpp [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
ObjC.h
Options.td [lld-macho] Optimize bind opcodes with multiple passes 2021-07-15 20:52:46 -07:00
OutputSection.cpp [lld/mac] Implement support for section$start and section$ end symbols 2021-07-23 16:01:09 -04:00
OutputSection.h [lld/mac] Implement support for section$start and section$ end symbols 2021-07-23 16:01:09 -04:00
OutputSegment.cpp [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
OutputSegment.h [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
Relocations.cpp
Relocations.h
Symbols.cpp [lld-macho] Implement ICF 2021-06-17 10:07:44 -07:00
Symbols.h [lld/mac] Fix bug in interaction of -dead_strip and -undefined dynamic_lookup 2021-07-22 19:30:46 -04:00
SymbolTable.cpp [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
SymbolTable.h [lld/mac] Implement -dead_strip 2021-06-02 11:09:26 -04:00
SyntheticSections.cpp [lld/mac] Let OutputSegment store its start address 2021-07-23 11:43:25 -04:00
SyntheticSections.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00
Target.cpp
Target.h [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
UnwindInfoSection.cpp [lld-macho] Fix unwind info personality size 2021-08-26 18:52:06 -04:00
UnwindInfoSection.h [lld/mac] Don't crash when dead-stripping removes all unwind info 2021-07-07 13:05:40 -04:00
Writer.cpp [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
Writer.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00