mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 10:54:56 +03:00
temporary
This commit is contained in:
parent
2c654752a5
commit
88bdcbf009
14
main.cc
14
main.cc
@ -223,20 +223,26 @@ int main(int argc, char **argv) {
|
||||
isec->output_section->chunks.push_back(isec);
|
||||
bin_sections_timer.stopTimer();
|
||||
|
||||
// Create an ELF header, a section header and a program header.
|
||||
std::vector<OutputChunk *> output_chunks;
|
||||
// Create linker-synthesized sections.
|
||||
out::ehdr = new OutputEhdr;
|
||||
out::phdr = new OutputPhdr;
|
||||
out::shstrtab = new StringTableSection(".shstrtab");
|
||||
|
||||
// Add ELF and program header to the output.
|
||||
std::vector<OutputChunk *> output_chunks;
|
||||
output_chunks.push_back(out::ehdr);
|
||||
output_chunks.push_back(out::phdr);
|
||||
|
||||
// Add .interp section
|
||||
// Add .interp section.
|
||||
output_chunks.push_back(new InterpSection);
|
||||
|
||||
// Add other output sections
|
||||
// Add other output sections.
|
||||
for (OutputSection *osec : get_output_sections())
|
||||
output_chunks.push_back(osec);
|
||||
|
||||
// Add a string table for section names.
|
||||
output_chunks.push_back(out::shstrtab);
|
||||
|
||||
// Create program header contents.
|
||||
out::phdr->hdr = create_phdrs();
|
||||
|
||||
|
@ -5,6 +5,8 @@ using namespace llvm::ELF;
|
||||
OutputEhdr *out::ehdr;
|
||||
OutputShdr *out::shdr;
|
||||
OutputPhdr *out::phdr;
|
||||
StringTableSection *out::shstrtab;
|
||||
|
||||
std::vector<OutputSection *> OutputSection::all_instances;
|
||||
|
||||
void OutputEhdr::relocate(uint8_t *buf) {
|
||||
|
Loading…
Reference in New Issue
Block a user