summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index daa7e7ac6..d6dbb3300 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2340,6 +2340,20 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
o << "\")" << maybeNewLine;
}
}
+ void printDylinkSection(const std::unique_ptr<DylinkSection>& dylinkSection) {
+ doIndent(o, indent) << ";; dylink section\n";
+ doIndent(o, indent) << ";; memorysize: " << dylinkSection->memorySize
+ << '\n';
+ doIndent(o, indent) << ";; memoryalignment: "
+ << dylinkSection->memoryAlignment << '\n';
+ doIndent(o, indent) << ";; tablesize: " << dylinkSection->tableSize
+ << '\n';
+ doIndent(o, indent) << ";; tablealignment: "
+ << dylinkSection->tableAlignment << '\n';
+ for (auto& neededDynlib : dylinkSection->neededDynlibs) {
+ doIndent(o, indent) << ";; needed dynlib: " << neededDynlib << '\n';
+ }
+ }
void visitModule(Module* curr) {
currModule = curr;
o << '(';
@@ -2388,6 +2402,9 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
}
ModuleUtils::iterDefinedFunctions(
*curr, [&](Function* func) { visitFunction(func); });
+ if (curr->dylinkSection) {
+ printDylinkSection(curr->dylinkSection);
+ }
for (auto& section : curr->userSections) {
doIndent(o, indent);
o << ";; custom section \"" << section.name << "\", size "