diff options
author | Doug Kwan <dougkwan@google.com> | 2010-04-07 21:42:22 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-04-07 21:42:22 +0000 |
commit | 7296d9338774c74e5a525f0c8f31c20f367997f5 (patch) | |
tree | 67b418679854fa1282c810a5ed529f3b56bedb4a /gold/options.h | |
parent | 45ecb02a77c46951cc295f519e2c36c4f999a047 (diff) | |
download | gdb-7296d9338774c74e5a525f0c8f31c20f367997f5.zip gdb-7296d9338774c74e5a525f0c8f31c20f367997f5.tar.gz gdb-7296d9338774c74e5a525f0c8f31c20f367997f5.tar.bz2 |
2010-04-07 Doug Kwan <dougkwan@google.com>
* 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.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h index 3a234d0..049a7ee 100644 --- a/gold/options.h +++ b/gold/options.h @@ -713,9 +713,15 @@ class General_options N_("Export all dynamic symbols"), N_("Do not export all dynamic symbols (default)")); + DEFINE_special(EB, options::ONE_DASH, '\0', + N_("Link big-endian objects."), NULL); + DEFINE_bool(eh_frame_hdr, options::TWO_DASHES, '\0', false, N_("Create exception frame header"), NULL); + DEFINE_special(EL, options::ONE_DASH, '\0', + N_("Link little-endian objects."), NULL); + DEFINE_bool(fatal_warnings, options::TWO_DASHES, '\0', false, N_("Treat warnings as errors"), N_("Do not treat warnings as errors")); @@ -824,12 +830,18 @@ class General_options DEFINE_string(oformat, options::EXACTLY_TWO_DASHES, '\0', "elf", N_("Set output format"), N_("[binary]")); + DEFINE_bool(p, options::ONE_DASH, '\0', false, + N_("(ARM only) Ignore for backward compatibility"), NULL); + DEFINE_bool(pie, options::ONE_DASH, '\0', false, N_("Create a position independent executable"), NULL); DEFINE_bool_alias(pic_executable, pie, options::TWO_DASHES, '\0', N_("Create a position independent executable"), NULL, false); + DEFINE_bool(pipeline_knowledge, options::ONE_DASH, '\0', false, + NULL, N_("(ARM only) Ignore for backward compatibility")); + #ifdef ENABLE_PLUGINS DEFINE_special(plugin, options::TWO_DASHES, '\0', N_("Load a plugin library"), N_("PLUGIN")); @@ -992,6 +1004,9 @@ class General_options DEFINE_bool(warn_constructors, options::TWO_DASHES, '\0', false, N_("Ignored"), N_("Ignored")); + DEFINE_bool(warn_mismatch, options::TWO_DASHES, '\0', true, + NULL, N_("Don't warn about mismatched input files")); + DEFINE_bool(warn_multiple_gp, options::TWO_DASHES, '\0', false, N_("Ignored"), NULL); @@ -1256,6 +1271,17 @@ class General_options fix_v4bx() const { return (this->fix_v4bx_); } + enum Endianness + { + ENDIANNESS_NOT_SET, + ENDIANNESS_BIG, + ENDIANNESS_LITTLE + }; + + Endianness + endianness() const + { return this->endianness_; } + private: // Don't copy this structure. General_options(const General_options&); @@ -1347,6 +1373,8 @@ class General_options std::map<std::string, uint64_t> section_starts_; // Whether to process armv4 bx instruction relocation. Fix_v4bx fix_v4bx_; + // Endianness. + Endianness endianness_; }; // The position-dependent options. We use this to store the state of |