aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-08-25 06:11:43 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-08-25 06:11:43 +0000
commit61f5d0545d98ab8252082db2bf10cdd40af51cee (patch)
tree2d9ad4b2a9eb19ebcafc6b14c1153722a3c3217e /ld
parent7c27f15bf3f4911891af28bd0c07bc108c7d9db4 (diff)
downloadgdb-61f5d0545d98ab8252082db2bf10cdd40af51cee.zip
gdb-61f5d0545d98ab8252082db2bf10cdd40af51cee.tar.gz
gdb-61f5d0545d98ab8252082db2bf10cdd40af51cee.tar.bz2
2004-08-24 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (wildcardp): Defined as a macro with strpbrk.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/ldlang.c27
2 files changed, 11 insertions, 20 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index f66ced5..9ca82f6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldlang.c (wildcardp): Defined as a macro with strpbrk.
+
2004-08-19 Mark Mitchell <mark@codesourcery.com>
* configure.tgt (arm*-*-symbianelf*): New target.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 8c6ebaf..fc95ee8 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -67,7 +67,6 @@ static struct bfd_hash_table lang_definedness_table;
/* Forward declarations. */
static void exp_init_os (etree_type *);
static void init_map_userdata (bfd *, asection *, void *);
-static bfd_boolean wildcardp (const char *);
static lang_input_statement_type *lookup_name (const char *);
static bfd_boolean load_symbols (lang_input_statement_type *,
lang_statement_list_type *);
@@ -107,6 +106,13 @@ int lang_statement_iteration = 0;
etree_type *base; /* Relocation base - or null */
+/* Return TRUE if the PATTERN argument is a wildcard pattern.
+ Although backslashes are treated specially if a pattern contains
+ wildcards, we do not consider the mere presence of a backslash to
+ be enough to cause the pattern to be treated as a wildcard.
+ That lets us handle DOS filenames more naturally. */
+#define wildcardp(pattern) (strpbrk ((pattern), "?*[") != NULL)
+
#define new_stat(x, y) \
(x##_type *) new_statement (x##_enum, sizeof (x##_type), y)
@@ -909,25 +915,6 @@ section_already_linked (bfd *abfd, asection *sec, void *data)
explicit actions, like foo.o(.text), bar.o(.text) and
foo.o(.text, .data). */
-/* Return TRUE if the PATTERN argument is a wildcard pattern.
- Although backslashes are treated specially if a pattern contains
- wildcards, we do not consider the mere presence of a backslash to
- be enough to cause the pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-
-static bfd_boolean
-wildcardp (const char *pattern)
-{
- const char *s;
-
- for (s = pattern; *s != '\0'; ++s)
- if (*s == '?'
- || *s == '*'
- || *s == '[')
- return TRUE;
- return FALSE;
-}
-
/* Add SECTION to the output section OUTPUT. Do this by creating a
lang_input_section statement which is placed at PTR. FILE is the
input file which holds SECTION. */