From b2e4da5a836b3d5246dc2fa183e18c1f63232490 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 1 Aug 2012 01:03:47 +0000 Subject: Don't call compare_section in case of by_none PR ld/14156 * ldlang.c (wild_sort): Don't call compare_section in case of by_none. * scripttempl/elf.sc: Add SORT_NONE to .init and .fini sections. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf32msp430_3.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. --- ld/ldlang.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ld/ldlang.c') diff --git a/ld/ldlang.c b/ld/ldlang.c index 5a4eef7..5327e12 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -2462,7 +2462,9 @@ wild_sort (lang_wild_statement_type *wild, /* Here either the files are not sorted by name, or we are looking at the sections for this file. */ - if (sec != NULL && sec->spec.sorted != none) + if (sec != NULL + && sec->spec.sorted != none + && sec->spec.sorted != by_none) if (compare_section (sec->spec.sorted, section, ls->section) < 0) break; } -- cgit v1.1