summaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-06-23 00:46:13 +0000
committerIan Lance Taylor <ian@airs.com>2011-06-23 00:46:13 +0000
commitb0b2c78443202be8166a1ee9ff0ecfb815f9e56c (patch)
tree5fc4768c4625d6e8d03ef76e0e5ae13490274c40 /gold/options.h
parent084e48335a6d3212d0d1581a61196ae5b549a09c (diff)
downloadbinutils-redhat-b0b2c78443202be8166a1ee9ff0ecfb815f9e56c.tar.gz
PR gold/12910
* options.h (class General_options): Add --ctors-in-init-array. * layout.cc (Layout::get_output_section): Treat SHT_INIT_ARRAY and friends as SHT_PROGBITS for merging sections. (Layout::layout): Remove special handling of .init_array and friends. Don't sort if doing relocatable link. Sort for .ctors and .dtors if ctors_in_init_array. (Layout::make_output_section): Force correct section types for .init_array and friends. Don't sort if doing relocatable link, Don't sort .ctors and .dtors if ctors_in_init_array. (Layout::section_name_mapping): Remove .ctors. and .dtorso. (Layout::output_section_name): Add relobj parameter. Change all callers. Handle .ctors. and .dtors. in code rather than table. Handle .ctors and .dtors if ctors_in_init_array. (Layout::match_file_name): New function, moved from output.cc. * layout.h (class Layout): Update declarations. * output.cc: Include "layout.h". (Input_section_sort_entry::get_priority): New function. (Input_section_sort_entry::match_file_name): Just call Layout::match_file_name. (Output_section::Input_section_sort_init_fini_compare::operator()): Handle .ctors and .dtors. Sort by explicit priority rather than by name. * configure.ac: Remove CONSTRUCTOR_PRIORITY test and conditional. * testsuite/initpri2.c: New test. * testsuite/Makefile.am: Don't test CONSTRUCTOR_PRIORITY. (check_PROGRAMS): Add initpri2. (initpri2_SOURCES, initpri2_DEPENDENCIES): New variables. (initpri2_LDFLAGS, initpri2_LDADD): New variables. * configure, testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/options.h b/gold/options.h
index b3b51dc67e..9989badce5 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1,6 +1,6 @@
// options.h -- handle command line options for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -663,6 +663,10 @@ class General_options
N_("Output cross reference table"),
N_("Do not output cross reference table"));
+ DEFINE_bool(ctors_in_init_array, options::TWO_DASHES, '\0', true,
+ N_("Use DT_INIT_ARRAY for all constructors (default)"),
+ N_("Handle constructors as directed by compiler"));
+
DEFINE_bool(define_common, options::TWO_DASHES, 'd', false,
N_("Define common symbols"),
N_("Do not define common symbols"));