aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/beos.em
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
committerNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
commit0112cd268b205d8176b8b4d00988a334822956cf (patch)
tree67d11340ff93c7dbc29c8917bc03d9d24555f43d /ld/emultempl/beos.em
parent4fa3602bd53183badf1d259128a5f951f32db8cb (diff)
downloadgdb-0112cd268b205d8176b8b4d00988a334822956cf.zip
gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.gz
gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.bz2
* bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its
argument and emits the string followed by a comma and then the length of the string. (CONST_STRNEQ): New macro. Checks to see if a variable string has a constant string as its initial characters. (CONST_STRNCPY): New macro. Copies a constant string to the start of a variable string. * bfd-in2.h: Regenerate. * <remainign files>: Make use of the new macros.
Diffstat (limited to 'ld/emultempl/beos.em')
-rw-r--r--ld/emultempl/beos.em19
1 files changed, 9 insertions, 10 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index 220ba59..adb5dfb 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -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