+2013-07-23 Cary Coutant <ccoutant@google.com>
+
+ * parameters.cc (Parameters::entry): Return target-specific entry
+ symbol name.
+ * target.h (Target::entry_symbol_name): New function.
+ (Target_info::entry_symbol_name): New data member.
+
+ * arm.cc (Target_arm::arm_info): Add entry_symbol_name.
+ * i386.cc (Target_i386::i386_info): Likewise.
+ (Target_i386_nacl::i386_nacl_info): Likewise.
+ * sparc.cc (Target_sparc::sparc_info): Likewise.
+ * tilegx.cc (Target_tilegx::tilegx_info): Likewise.
+ * x86_64.cc: (Target_x86_64::x86_64_info) Likewise.
+ (Target_x86_64_nacl::x86_64_nacl_info) Likewise.
+ * testsuite/testfile.cc (Target_test::test_target_info): Likewise.
+
2013-07-22 Sterling Augustine <saugustine@google.com>
* dwarf_reader.cc (Dwarf_pubnames_table::read_section):
0, // small_common_section_flags
0, // large_common_section_flags
".ARM.attributes", // attributes_section
- "aeabi" // attributes_vendor
+ "aeabi", // attributes_vendor
+ "_start" // entry_symbol_name
};
// Arm relocate functions class
0, // small_common_section_flags
0, // large_common_section_flags
".ARM.attributes", // attributes_section
- "aeabi" // attributes_vendor
+ "aeabi", // attributes_vendor
+ "_start" // entry_symbol_name
};
template<bool big_endian>
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.
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
{
const char* ret = this->options().entry();
if (ret == NULL)
- {
- // FIXME: Need to support target specific entry symbol.
- ret = "_start";
- }
+ ret = parameters->target().entry_symbol_name();
return ret;
}
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
inline bool
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
// We have to take care here, even when operating in little-endian
gc_mark_symbol(Symbol_table* symtab, Symbol* sym) const
{ this->do_gc_mark_symbol(symtab, sym); }
+ // Return the name of the entry point symbol.
+ const char*
+ entry_symbol_name() const
+ { return this->pti_->entry_symbol_name; }
+
protected:
// This struct holds the constant information for a child class. We
// use a struct to avoid the overhead of virtual function calls for
const char* attributes_section;
// Vendor name of vendor attributes.
const char* attributes_vendor;
+ // Name of the main entry point to the program.
+ const char* entry_symbol_name;
};
Target(const Target_info* pti)
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
// The test targets.
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
0, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
// tilegx relocation handlers
0, // small_common_section_flags
elfcpp::SHF_X86_64_LARGE, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
elfcpp::SHF_X86_64_LARGE, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
// This is called when a new output section is created. This is where
0, // small_common_section_flags
elfcpp::SHF_X86_64_LARGE, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
template<>
0, // small_common_section_flags
elfcpp::SHF_X86_64_LARGE, // large_common_section_flags
NULL, // attributes_section
- NULL // attributes_vendor
+ NULL, // attributes_vendor
+ "_start" // entry_symbol_name
};
#define NACLMASK 0xe0 // 32-byte alignment mask.