From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23089 invoked by alias); 7 Aug 2006 18:10:50 -0000 Received: (qmail 23080 invoked by uid 22791); 7 Aug 2006 18:10:49 -0000 X-Spam-Check-By: sourceware.org Received: from smtp102.sbc.mail.mud.yahoo.com (HELO smtp102.sbc.mail.mud.yahoo.com) (68.142.198.201) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 07 Aug 2006 18:10:45 +0000 Received: (qmail 55283 invoked from network); 7 Aug 2006 18:10:43 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.93.16 with login) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 7 Aug 2006 18:10:42 -0000 Received: by lucon.org (Postfix, from userid 1000) id 61D6F63EFA; Mon, 7 Aug 2006 11:10:41 -0700 (PDT) Date: Mon, 07 Aug 2006 18:10:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Cc: sonal.santan@xilinx.com Subject: Linker --sort-section name is broken Message-ID: <20060807181041.GA18835@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00075.txt.bz2 Hi Sonal, Your linker patch breaks --sort-section name. In wild (), you hae if (s->handler_data[0] && s->handler_data[0]->spec.sorted == by_name && !s->filenames_sorted) { lang_section_bst_type *tree; walk_wild (s, output_section_callback_fast, output); tree = (lang_section_bst_type *) s->handler_data[1]; if (tree) output_section_callback_tree_to_list (s, tree, output); s->handler_data[1] = NULL; } With "--sort-section name" on *(.text .text.*) handler_data[1] is a wildcard spec. But you use it for BST in wild_sort_fast. I don't see how it can work. I really don't like tree = (lang_section_bst_type **) &wild->handler_data[1]; It is hard to check if it is really valid. H.J.