this->fill_->print(f);
}
+ if (this->phdrs_ != NULL)
+ {
+ for (String_list::const_iterator p = this->phdrs_->begin();
+ p != this->phdrs_->end();
+ ++p)
+ fprintf(f, " :%s", p->c_str());
+ }
+
fprintf(f, "\n");
}
this->segment_->set_flags(this->flags_);
}
+ // Print for debugging.
+ void
+ print(FILE*) const;
+
private:
// The name used in the script.
std::string name_;
Output_segment* segment_;
};
+// Print for debugging.
+
+void
+Phdrs_element::print(FILE* f) const
+{
+ fprintf(f, " %s 0x%x", this->name_.c_str(), this->type_);
+ if (this->includes_filehdr_)
+ fprintf(f, " FILEHDR");
+ if (this->includes_phdrs_)
+ fprintf(f, " PHDRS");
+ if (this->is_flags_valid_)
+ fprintf(f, " FLAGS(%u)", this->flags_);
+ if (this->load_address_ != NULL)
+ {
+ fprintf(f, " AT(");
+ this->load_address_->print(f);
+ fprintf(f, ")");
+ }
+ fprintf(f, ";\n");
+}
+
// Class Script_sections.
Script_sections::Script_sections()
(*p)->print(f);
fprintf(f, "}\n");
+
+ if (this->phdrs_elements_ != NULL)
+ {
+ fprintf(f, "PHDRS {\n");
+ for (Phdrs_elements::const_iterator p = this->phdrs_elements_->begin();
+ p != this->phdrs_elements_->end();
+ ++p)
+ (*p)->print(f);
+ fprintf(f, "}\n");
+ }
}
} // End namespace gold.