For relocations against temporary symbols (that don't persist in
the object file), we normally adjust them to reference the start of
the section.
For adrp relocations, the immediate offset from the referenced
symbol is stored in the opcode as the 21 bit signed immediate; this
means that the symbol referenced must be within +/- 1 MB from the
referenced symbol.
Create label symbols with regular intervals (1 MB intervals). For
relocations against temporary symbols, pick the preceding added
offset symbol and make the relocation against that instead of
against the start of the section.
This should fix the root issue behind
https://bugs.llvm.org/show_bug.cgi?id=52378.
These should both really have default member initializers (= false). Looking at the constructor, it's not at all clear how UseBigObj is initialized.
I thought this was part of CodingStandards, but I don't see it there. *shrug*