From 7296d9338774c74e5a525f0c8f31c20f367997f5 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Wed, 7 Apr 2010 21:42:22 +0000 Subject: 2010-04-07 Doug Kwan * arm.cc: Replace "endianity" with "endianness" in comments. (Arm_exidx_cantunwind): Ditto. (Arm_relobj::Arm_relobj): Initialize merge_flags_and_attribures. (Arm_relobj::merge_flags_and_attributes): New method. (Arm_relobj::merge_flags_and_attributes_): New data member. (Arm_exidx_cantunwind::do_fixed_endian_write): Fix formatting. (Arm_relobj::scan_sections_for_stubs): Ditto. (Arm_relobj::do_read_symbols): Check to see if we really want to merge processor-specific flags and attributes. Exit early if an object is empty except for section names and the undefined symbol. (Target_arm::do_finalize_sections): Move check for ELF format to Arm_relobj::do_read_symbols. Merge processor specific flags and attributes from a regular object only when we have determined that it is aapropriate. Do not create an .ARM.attributes section in output if there is no regular input object. (Target_arm::merge_processor_specific_flags): Check --warn-mismatch before printing any error. (Target_arm::merge_object_attributes): Ditto. * gold.cc (queue_middle_tasks): Handle the case in which there is no regular object in input. * options.cc (General_options::parse_EB): New method. (General_options::parse_EL): Same. (General_options::General_options): Initialize endianness_. * options.h (-EB, -EL, -no-pipeline-knowledge, -p, --warn-mismatch): New options. (General_options::Endianness): New enum. (General_options::endianness): New method. (General_options::endianness_): New data member. * parameters.cc (Parameters::set_options): Check target endianness. (Parameters::set_target_once): Ditto. (Parameters::check_target_endianness): New method. (parameters_force_valid_target): If either -EL or -EB is specified, use it to define endianness of default target. * parameters.h (Parameters::check_target_endianness): New method declaration. * target.h (class Target): Change "endianity" to "endianness" in comments. --- gold/options.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gold/options.cc') diff --git a/gold/options.cc b/gold/options.cc index 0eb38ada837..c566b99b2ad 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -614,6 +614,18 @@ General_options::parse_fix_v4bx_interworking(const char*, const char*, this->fix_v4bx_ = FIX_V4BX_INTERWORKING; } +void +General_options::parse_EB(const char*, const char*, Command_line*) +{ + this->endianness_ = ENDIANNESS_BIG; +} + +void +General_options::parse_EL(const char*, const char*, Command_line*) +{ + this->endianness_ = ENDIANNESS_LITTLE; +} + } // End namespace gold. namespace @@ -845,7 +857,8 @@ General_options::General_options() excluded_libs_(), symbols_to_retain_(), section_starts_(), - fix_v4bx_(FIX_V4BX_NONE) + fix_v4bx_(FIX_V4BX_NONE), + endianness_(ENDIANNESS_NOT_SET) { // Turn off option registration once construction is complete. gold::options::ready_to_register = false; -- cgit v1.2.1