diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-03-29 08:09:55 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-03-29 08:09:55 +0000 |
commit | ab794b6bda9482bd406d05d592849639887036d5 (patch) | |
tree | cd9ac945653fae1d114619141e8df95a2a1b4762 /gold/testsuite/initpri1.c | |
parent | 479f65031f8b864bf4973b8495761aa769a087cf (diff) | |
download | gdb-ab794b6bda9482bd406d05d592849639887036d5.zip gdb-ab794b6bda9482bd406d05d592849639887036d5.tar.gz gdb-ab794b6bda9482bd406d05d592849639887036d5.tar.bz2 |
* output.cc
(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.
Diffstat (limited to 'gold/testsuite/initpri1.c')
-rw-r--r-- | gold/testsuite/initpri1.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gold/testsuite/initpri1.c b/gold/testsuite/initpri1.c index 4826389..890df03 100644 --- a/gold/testsuite/initpri1.c +++ b/gold/testsuite/initpri1.c @@ -64,7 +64,7 @@ void d2() { } void d3() { - if (j != 2) + if (j != 4) abort (); if (--i != 1) abort (); @@ -78,10 +78,18 @@ void cd4() { ++j; } +void cd5() __attribute__((constructor, destructor)); + +void cd5() { + if (i != 3) + abort(); + ++j; +} + int main () { if (i != 3) return 1; - if (j != 1) + if (j != 2) abort (); return 0; } |