// i386.cc -- i386 target support for gold.
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
// Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
: Sized_target<32, false>(info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
- rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL),
+ rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
{ }
Reloc_section* rel_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_REL, 32, false> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index.
unsigned int got_mod_index_offset_;
// True if the _TLS_MODULE_BASE_ symbol has been defined.
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
// Get the GOT section, creating it if necessary.
}
}
+ if (view == NULL)
+ return true;
+
const Sized_relobj_file<32, false>* object = relinfo->object;
// Pick the value to use for symbols defined in shared objects.
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;
};
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
#define NACLMASK 0xe0 // 32-byte alignment mask
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