diff options
author | Roland McGrath <roland@gnu.org> | 2013-08-16 18:12:05 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2013-08-16 18:12:05 +0000 |
commit | 93f8221c643088fab039a4934623f0be0762d777 (patch) | |
tree | bfc39ac4a25e7afff1c01942804e82d8444274ca /gold/x86_64.cc | |
parent | 70cc1c235fe2b3fde70b91c46158531c38896217 (diff) | |
download | gdb-93f8221c643088fab039a4934623f0be0762d777.zip gdb-93f8221c643088fab039a4934623f0be0762d777.tar.gz gdb-93f8221c643088fab039a4934623f0be0762d777.tar.bz2 |
gold/
* i386.cc (Target_i386_nacl::do_code_fill): New virtual function.
* x86_64.cc (Target_x86_64_nacl::do_code_fill): New virtual function.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r-- | gold/x86_64.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 4f4d612..dca6022 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -4572,6 +4572,9 @@ class Target_x86_64_nacl : public Target_x86_64<size> plt_count); } + virtual std::string + do_code_fill(section_size_type length) const; + private: static const Target::Target_info x86_64_nacl_info; }; @@ -4798,6 +4801,16 @@ Output_data_plt_x86_64_nacl<size>::plt_eh_frame_fde[plt_eh_frame_fde_size] = 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> |