* bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its
[deliverable/binutils-gdb.git] / ld / emultempl / beos.em
index 220ba5900a3f164a376dcbe4611a9d9d83c5ff07..adb5dfbfcb4f4bfe56031a06e62c390fba4094fb 100644 (file)
@@ -8,7 +8,7 @@ fi
 cat >e${EMULATION_NAME}.c <<EOF
 /* This file is part of GLD, the Gnu Linker.
    Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005 Free Software Foundation, Inc.
+   2005, 2006 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -452,16 +452,15 @@ sort_by_section_name (const void *a, const void *b)
   const lang_statement_union_type *const *rb = b;
   int i;
   i = strcmp ((*ra)->input_section.section->name,
-                (*rb)->input_section.section->name);
-/* this is a hack to make .stab and .stabstr last, so we don't have
-   to fix strip/objcopy for .reloc sections.
-   FIXME stripping images with a .rsrc section still needs to be fixed */
-  if ( i != 0)
+             (*rb)->input_section.section->name);
+  /* This is a hack to make .stab and .stabstr last, so we don't have
+     to fix strip/objcopy for .reloc sections.
+     FIXME stripping images with a .rsrc section still needs to be fixed.  */
+  if (i != 0)
     {
-      if ((strncmp ((*ra)->input_section.section->name, ".stab", 5) == 0)
-           && (strncmp ((*rb)->input_section.section->name, ".stab", 5) != 0))
+      if ((CONST_STRNEQ ((*ra)->input_section.section->name, ".stab"))
+           && (! CONST_STRNEQ ((*rb)->input_section.section->name, ".stab")))
          return 1;
-      return i;
     }
   return i;
 }
@@ -534,7 +533,7 @@ sort_sections (lang_statement_union_type *s)
            {
              /* Is this the .idata section?  */
              if (sec->spec.name != NULL
-                 && strncmp (sec->spec.name, ".idata", 6) == 0)
+                 && CONST_STRNEQ (sec->spec.name, ".idata"))
                {
                  /* Sort the children.  We want to sort any objects in
                     the same archive.  In order to handle the case of
This page took 0.024181 seconds and 4 git commands to generate.