summaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-05-06 05:03:15 +0000
committerIan Lance Taylor <ian@airs.com>2008-05-06 05:03:15 +0000
commitd98bc257cffa804406c40b84ecfc8801c2ee90e2 (patch)
tree3287a837c98dcfaf11d5d3b5d026765d82c3b8cb /gold/options.h
parent00d1674256539a39ac940429a2a0171d0e67fc41 (diff)
downloadbinutils-gdb-d98bc257cffa804406c40b84ecfc8801c2ee90e2.tar.gz
2008-05-05 Ian Lance Taylor <iant@google.com>
* options.h (DEFINE_bool): For DASH_Z, create the negative option as noVARNAME rather than no-VARNAME. (class General_options): Add option -z combreloc. * output.h (class Output_reloc) [SHT_REL]: Declare compare and get_address. (Output_reloc::sort_before) [SHT_REL]: New function. (Output_reloc::sort_before) [SHT_RELA]: New function. (class Output_data_reloc_base): Add sort_relocs_ field. Define Sort_relocs_comparison. (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs parameter. Change all callers. (Output_data_reloc::Output_data_reloc) [both versions]: Add sort_relocs parameter. Change all callers. * output.cc (Output_reloc::get_address): New function, broken out of write_rel. (Output_reloc::write_rel): Call it. (Output_reloc::compare): New function. (Output_data_reloc_base::do_write): Optionally sort relocs.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gold/options.h b/gold/options.h
index 419e70bb4e1..0dd822104d4 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -268,7 +268,8 @@ struct Struct_special : public Struct_var
// These macros allow for easy addition of a new commandline option.
// If no_helpstring__ is not NULL, then in addition to creating
-// VARNAME, we also create an option called no-VARNAME.
+// VARNAME, we also create an option called no-VARNAME (or, for a -z
+// option, noVARNAME).
#define DEFINE_bool(varname__, dashes__, shortname__, default_value__, \
helpstring__, no_helpstring__) \
DEFINE_var(varname__, dashes__, shortname__, default_value__, \
@@ -276,7 +277,10 @@ struct Struct_special : public Struct_var
false, bool, bool, options::parse_bool) \
struct Struct_no_##varname__ : public options::Struct_var \
{ \
- Struct_no_##varname__() : option("no-" #varname__, dashes__, '\0', \
+ Struct_no_##varname__() : option((dashes__ == options::DASH_Z \
+ ? "no" #varname__ \
+ : "no-" #varname__), \
+ dashes__, '\0', \
default_value__ ? "false" : "true", \
no_helpstring__, NULL, false, this) \
{ } \
@@ -699,8 +703,9 @@ class General_options
// The -z options.
- // Both execstack and noexecstack differ from the default execstack_
- // value, so we need to use different variables for them.
+ DEFINE_bool(combreloc, options::DASH_Z, '\0', true,
+ N_("Sort dynamic relocs"),
+ N_("Do not sort dynamic relocs"));
DEFINE_uint64(common_page_size, options::DASH_Z, '\0', 0,
N_("Set common page size to SIZE"), N_("SIZE"));
DEFINE_bool(defs, options::DASH_Z, '\0', false,