Skip to content

Instantly share code, notes, and snippets.

@martell
Created June 12, 2016 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martell/2b5dbc1ec9ace168330536761587685c to your computer and use it in GitHub Desktop.
Save martell/2b5dbc1ec9ace168330536761587685c to your computer and use it in GitHub Desktop.
StringRef CtorHead = StringRef("__CTOR_LIST__");
auto *CtorHeadImport = new DefinedRegular(CtorHead, new Defined(lld::coff::DefinedBitcode::DefinedRegularKind));
coff_section Sec;
auto *CtorSection = new (Alloc) SectionChunk(this, &Sec);
OutputSection *Ctors = createSection(".ctors");
Ctors->addChunk(CtorSection->getChunk());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment