- void addRelocation(const MCSectionData *SD,
- MachO::relocation_info &MRE) {
- MachO::any_relocation_info AMRE;
- memcpy(&AMRE, &MRE, sizeof(MRE));
- Relocations[SD].push_back(AMRE);
- }
-
- void addRelocation(const MCSectionData *SD,
- MachO::scattered_relocation_info &SMRE) {
- MachO::any_relocation_info MRE;
- memcpy(&MRE, &SMRE, sizeof(MRE));
- Relocations[SD].push_back(MRE);
- }
-
- void addRelocation(const MCSectionData *SD,
+ // Add a relocation to be output in the object file. At the time this is
+ // called, the symbol indexes are not know, so if the relocation refers
+ // to a symbol it should be passed as \p RelSymbol so that it can be updated
+ // afterwards. If the relocation doesn't refer to a symbol, nullptr should be
+ // used.
+ void addRelocation(const MCSymbol *RelSymbol, const MCSection *Sec,