aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/initpri1.c
AgeCommit message (Collapse)AuthorFilesLines
2009-09-27 * testsuite/initpri1.c: Don't try to use constructor priorities ifIan Lance Taylor1-5/+15
compiling with gcc before 4.3.
2008-12-09 * testsuite/initpri1.c: Change all declarations to be fullIan Lance Taylor1-9/+9
prototypes by adding void, to avoid compiler warnings.
2008-03-29 * output.ccIan Lance Taylor1-2/+10
(Output_section::Input_section_sort_entry::has_priority): New function. (Output_section::Input_section_sort_entry::match_file_name): New function. (Output_section::Input_section_sort_entry::match_section_name): Remove. (Output_section::Input_section_sort_entry::match_section_name_prefix): Remove. (Output_section::Input_section_sort_entry::match_section_file): Remove. (Output_section::Input_section_sort_compare::operator()): Rewrite using new Input_section_sort_entry functions. Sort crtbegin and crtend first. Sort sections with no priority before sections with a priority. * testsuite/initpri1.c (d3): Check j != 4. (cd5): New constructor/destructor function. (main): Check j != 2.
2008-03-28 * layout.cc (Layout::layout): If we see an input section with aIan Lance Taylor1-0/+87
name that needs sorting, set the must_sort flag for the output section. (Layout::make_output_section): If the name of the output section indicates that it might require sorting, set the may_sort flag. * output.h (Output_section::may_sort_attached_input_sections): New function. (Output_section::set_may_sort_attached_input_sections): New function. (Output_section::must_sort_attached_input_sections): New function. (Output_section::set_must_sort_attached_input_sections): New function. (class Output_section): Declare Input_section_sort_entry. Define Input_section_sort_compare. Declare sort_attached_input_sections. Add new fields: may_sort_attached_input_sections_, must_sort_attached_input_sections_, attached_input_sections_are_sorted_. * output.cc (Output_section::Output_section): Initialize new fields. (Output_section::add_input_section): Add an entry to input_sections_ if may_sort or must_sort are true. (Output_section::set_final_data_size): Call sort_attached_input_sections if necessary. (Output_section::Input_section_sort_entry): Define new class. (Output_section::Input_section_sort_compare::operator()): New function. (Output_section::sort_attached_input_sections): New function. * configure.ac: Check whether the compiler supports constructor priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. * testsuite/initpri1.c: New file. * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if CONSTRUCTOR_PRIORITY. (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. (initpri1_LDFLAGS): New variable. * configure, Makefile.in, testsuite/Makefile.in: Rebuild.