public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Cc: sonal.santan@xilinx.com
Subject: Linker --sort-section name is broken
Date: Mon, 07 Aug 2006 18:10:00 -0000	[thread overview]
Message-ID: <20060807181041.GA18835@lucon.org> (raw)

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.

             reply	other threads:[~2006-08-07 18:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 18:10 H. J. Lu [this message]
2006-08-07 21:44 ` Sonal Santan
2006-08-07 21:56   ` PATCH ld/3006: " H. J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060807181041.GA18835@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    --cc=sonal.santan@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).