public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Linker --sort-section name is broken
@ 2006-08-07 18:10 H. J. Lu
  2006-08-07 21:44 ` Sonal Santan
  0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2006-08-07 18:10 UTC (permalink / raw)
  To: binutils; +Cc: sonal.santan

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-07 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 18:10 Linker --sort-section name is broken H. J. Lu
2006-08-07 21:44 ` Sonal Santan
2006-08-07 21:56   ` PATCH ld/3006: " H. J. Lu

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).