* i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
* x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
+2013-08-16 Roland McGrath <mcgrathr@google.com>
+
+ * i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
+ * x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
+
2013-08-07 Cary Coutant <ccoutant@google.com>
Revert support for v2 DWP files:
return new Output_data_plt_i386_nacl_exec(layout, got_plt, got_irelative);
}
+ virtual std::string
+ do_code_fill(section_size_type length) const;
+
private:
static const Target::Target_info i386_nacl_info;
};
elfcpp::DW_CFA_nop
};
+// Return a string used to fill a code section with nops.
+// For NaCl, long NOPs are only valid if they do not cross
+// bundle alignment boundaries, so keep it simple with one-byte NOPs.
+std::string
+Target_i386_nacl::do_code_fill(section_size_type length) const
+{
+ return std::string(length, static_cast<char>(0x90));
+}
+
// The selector for i386-nacl object files.
class Target_selector_i386_nacl
plt_count);
}
+ virtual std::string
+ do_code_fill(section_size_type length) const;
+
private:
static const Target::Target_info x86_64_nacl_info;
};
elfcpp::DW_CFA_nop
};
+// Return a string used to fill a code section with nops.
+// For NaCl, long NOPs are only valid if they do not cross
+// bundle alignment boundaries, so keep it simple with one-byte NOPs.
+template<int size>
+std::string
+Target_x86_64_nacl<size>::do_code_fill(section_size_type length) const
+{
+ return std::string(length, static_cast<char>(0x90));
+}
+
// The selector for x86_64-nacl object files.
template<int size>