MCMachOObjectDisassembler::MCMachOObjectDisassembler(
    const MachOObjectFile &MOOF, const MCDisassembler &Dis,
    const MCInstrAnalysis &MIA, uint64_t VMAddrSlide,
    uint64_t HeaderLoadAddress)
    : MCObjectDisassembler(MOOF, Dis, MIA), MOOF(MOOF),
      VMAddrSlide(VMAddrSlide), HeaderLoadAddress(HeaderLoadAddress) {

    for (const SectionRef &Section : MOOF.sections()) {
        StringRef Name;
        Section.getName(Name);
        // FIXME: We should use the S_ section type instead of the name.
        if (Name == "__mod_init_func") {
            DEBUG(dbgs() << "Found __mod_init_func section!\n");
            Section.getContents(ModInitContents);
        } else if (Name == "__mod_exit_func") {
            DEBUG(dbgs() << "Found __mod_exit_func section!\n");
            Section.getContents(ModExitContents);
        }
    }
}