aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-06-25 00:40:57 +0000
committerIan Lance Taylor <ian@airs.com>2011-06-25 00:40:57 +0000
commit487b39dfdd6cdfcac1124f2bcacd70a2da92f242 (patch)
treedae756aa105cf7da1781b1b7cec907e38c082167 /gold/layout.h
parent79763091fb5ba8a787fc19b37edb5608ec5e3ec5 (diff)
downloadgdb-487b39dfdd6cdfcac1124f2bcacd70a2da92f242.zip
gdb-487b39dfdd6cdfcac1124f2bcacd70a2da92f242.tar.gz
gdb-487b39dfdd6cdfcac1124f2bcacd70a2da92f242.tar.bz2
* layout.cc: Include "object.h".
(ctors_sections_in_init_array): New static variable. (Layout::is_ctors_in_init_array): New function. (Layout::layout): Add entry to ctors_sections_in_init_array if appropriate. * layout.h (class Layout): Declare is_ctors_in_init_array. * reloc.cc (Sized_relobj_file::do_relocate): Call reverse_words if is_ctors_reverse_view is set. (Sized_relobj_file::write_sections): Add layout parameter. Change all callers. Set is_ctors_reverse_view field of View_size. (Sized_relobj_file::reverse_words): New function. * object.h (Sized_relobj_file::View_size): Add is_ctors_reverse_view field. (class Sized_relobj_file): Update declarations. * testsuite/initpri3.c: New test. * testsuite/Makefile.am: (check_PROGRAMS): Add initpri3a and initpri3b. (initpri3a_SOURCES, initpri3a_DEPENDENCIES): New variables. (initpri3a_LDFLAGS, initpri3a_LDADD): New variables. (initpri3b_SOURCES, initpri3b_DEPENDENCIES): New variables. (initpri3b_LDFLAGS, initpri3b_LDADD): New variables. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/layout.h')
-rw-r--r--gold/layout.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/layout.h b/gold/layout.h
index 3eee820..0f6840e 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -651,6 +651,12 @@ class Layout
static bool
match_file_name(const Relobj* relobj, const char* file_name);
+ // Return whether section SHNDX in RELOBJ is a .ctors/.dtors section
+ // with more than one word being mapped to a .init_array/.fini_array
+ // section.
+ bool
+ is_ctors_in_init_array(Relobj* relobj, unsigned int shndx) const;
+
// Check if a comdat group or .gnu.linkonce section with the given
// NAME is selected for the link. If there is already a section,
// *KEPT_SECTION is set to point to the signature and the function