]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2001-07-19 David O'Brien <obrien@FreeBSD.org>
authorDavid O'Brien <obrien@FreeBSD.org>
Fri, 20 Jul 2001 02:22:18 +0000 (02:22 +0000)
committerDavid O'Brien <obrien@FreeBSD.org>
Fri, 20 Jul 2001 02:22:18 +0000 (02:22 +0000)
* lbasename.c: New file.
* libiberty.h: Add lbasename.

Approved by:  Philip Blundell <philb@gnu.org>
              <E15K1Xn-00032C-00@kings-cross.london.uk.eu.org>

* emultempl/elf32.em: Do not assuming that contents of the buffer
returned from basename function will remain unchanged accross other
function calls.

Approved by:  Philip Blundell <philb@gnu.org>
              <E15MO4s-00017V-00@kings-cross.london.uk.eu.org>

include/ChangeLog
include/libiberty.h
ld/ChangeLog
ld/emultempl/elf32.em
libiberty/ChangeLog
libiberty/Makefile.in

index 10bb1b2a86b6b23c3555669766ce6082fa39a45e..ad96520e28f646ac303f962cb91aade971846b2b 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-19  David O'Brien  <obrien@FreeBSD.org>
+
+       * libiberty.h: Add lbasename.
+
 2001-06-07  Alan Modra  <amodra@bigpond.net.au>
 
        * Many files: Update copyright notices.
index 1bc2b7d403b900896ac5b0e4864a0577f8a19d32..d31ac777dd485abbe438eb36711ceb0c8bb6fae5 100644 (file)
@@ -81,6 +81,10 @@ extern char *basename ();
 # endif
 #endif
 
+/* A well-defined basename () that is always compiled in.  */
+
+extern char *lbasename PARAMS ((const char *));
+
 /* Concatenate an arbitrary number of strings, up to (char *) NULL.
    Allocates memory using xmalloc.  */
 
index 54a9aa5c30130faac4d08b4e122d6e5bfa83409f..df9f3c5f54b510ba70ca5adc889e226911c46f5d 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-19  David O'Brien  <obrien@FreeBSD.org>
+
+       * emultempl/elf32.em: Do not assuming that contents of the buffer
+       returned from basename function will remain unchanged accross other
+       function calls.
+
 2001-07-19  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * ldlang.c (lang_leave_overlay): If a region is specified assign
index c0d52b1020553fb111f86083c83feba25243440c..76aaa8a66cc4ff8ffa7a6d9c3e7022bad050d154 100644 (file)
@@ -142,7 +142,7 @@ gld${EMULATION_NAME}_vercheck (s)
 
   soname = bfd_elf_get_dt_soname (s->the_bfd);
   if (soname == NULL)
-    soname = basename (bfd_get_filename (s->the_bfd));
+    soname = lbasename (bfd_get_filename (s->the_bfd));
 
   for (l = global_vercheck_needed; l != NULL; l = l->next)
     {
@@ -224,7 +224,7 @@ gld${EMULATION_NAME}_stat_needed (s)
 
   soname = bfd_elf_get_dt_soname (s->the_bfd);
   if (soname == NULL)
-    soname = basename (s->filename);
+    soname = lbasename (s->filename);
 
   if (strncmp (soname, global_needed->name,
               suffix - global_needed->name) == 0)
@@ -329,7 +329,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
     einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
 
   /* First strip off everything before the last '/'.  */
-  soname = basename (abfd->filename);
+  soname = lbasename (abfd->filename);
 
   if (trace_file_tries)
     info_msg (_("found %s at %s\n"), soname, name);
index dc1ef09830498162b46f2864256b420edee03970..4b599768bbaca95e84175446ec594083f6724bed 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-19  David O'Brien  <obrien@FreeBSD.org>
+
+       * lbasename.c: New file.
+
 2000-12-29  DJ Delorie  <dj@redhat.com>
 
        * fnmatch.c: Make the note about the origins of this file more
index 0eab5a6c141276621ed95e19eb44e20dfdf674ff..16a040c7f89f09a07ea0cdb71235902020ab45ff 100644 (file)
@@ -128,7 +128,8 @@ CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c            \
        bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c           \
         cp-demangle.c dyn-string.c fdmatch.c fnmatch.c getcwd.c                      \
        getpwd.c getopt.c getopt1.c getpagesize.c getruntime.c                \
-       floatformat.c hashtab.c hex.c index.c insque.c md5.c memchr.c         \
+       floatformat.c hashtab.c hex.c index.c insque.c lbasename.c            \
+       md5.c memchr.c                                                        \
        memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c  \
        partition.c pexecute.c putenv.c random.c rename.c rindex.c setenv.c   \
        sigsetmask.c safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c   \
@@ -140,7 +141,8 @@ CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c            \
 # These are always included in the library.
 REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o     \
        dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o          \
-       getruntime.o hashtab.o hex.o floatformat.o md5.o objalloc.o obstack.o \
+       getruntime.o hashtab.o hex.o floatformat.o lbasename.o md5.o          \
+       objalloc.o obstack.o                                                  \
        partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o      \
        strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xmemdup.o          \
        xstrdup.o xstrerror.o
@@ -276,6 +278,7 @@ getpwd.o: config.h $(INCDIR)/libiberty.h
 getruntime.o: config.h $(INCDIR)/libiberty.h
 hex.o: $(INCDIR)/libiberty.h
 floatformat.o: $(INCDIR)/floatformat.h
+lbasename.o: $(INCDIR)/libiberty.h
 mkstemps.o: config.h
 md5.o: config.h
 objalloc.o: config.h $(INCDIR)/objalloc.h