diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 10 | ||||
-rw-r--r-- | binutils/Makefile.am | 14 | ||||
-rw-r--r-- | binutils/Makefile.in | 22 | ||||
-rw-r--r-- | binutils/dyn-string.c | 107 | ||||
-rw-r--r-- | binutils/dyn-string.h | 34 |
5 files changed, 26 insertions, 161 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4672b26..2fcbc1d 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,15 @@ 2000-06-15 H.J. Lu <hjl@gnu.org> + * dyn-string.c: Removed. Not needed with dyn-string.c in + libiberty. + * dyn-string.h: Likewise. + + * Makefile.am: Remove references to dyn-string.c and + dyn-string.h. Rebuild dependency. + * Makefile.in: Rebuild. + +2000-06-15 H.J. Lu <hjl@gnu.org> + * binutils.texi: Put a warning on copying relocatable object files between two different formats. diff --git a/binutils/Makefile.am b/binutils/Makefile.am index 1caa94c..837f861 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -77,7 +77,7 @@ MKDEP = gcc -MM INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\"" HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \ - windres.h winduni.h dyn-string.h + windres.h winduni.h GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h @@ -87,7 +87,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \ objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \ stabs.c strings.c sysdump.c version.c wrstabs.c \ windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \ - resres.c dyn-string.c dllwrap.c rename.c + resres.c dllwrap.c rename.c GENERATED_CFILES = \ underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \ @@ -245,7 +245,7 @@ sysinfo.h: sysinfo.c srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) -dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS) +dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS) dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) dlltool.o:dlltool.c @@ -270,7 +270,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \ winduni.c resres.c $(BULIBS) windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -dllwrap_SOURCES = dllwrap.c dyn-string.c version.c +dllwrap_SOURCES = dllwrap.c version.c dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS) @@ -394,7 +394,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h debug.h dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \ dlltool.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h @@ -488,11 +488,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h -dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \ - dyn-string.h dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h dyn-string.h + $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h underscore.o: underscore.c diff --git a/binutils/Makefile.in b/binutils/Makefile.in index fabce3b..0e99f1b 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -178,7 +178,7 @@ MKDEP = gcc -MM INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\"" HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \ - windres.h winduni.h dyn-string.h + windres.h winduni.h GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h @@ -189,7 +189,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \ objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \ stabs.c strings.c sysdump.c version.c wrstabs.c \ windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \ - resres.c dyn-string.c dllwrap.c rename.c + resres.c dllwrap.c rename.c GENERATED_CFILES = \ @@ -269,7 +269,7 @@ addr2line_SOURCES = addr2line.c $(BULIBS) srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) -dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS) +dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS) dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS) @@ -283,7 +283,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \ windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) -dllwrap_SOURCES = dllwrap.c dyn-string.c version.c +dllwrap_SOURCES = dllwrap.c version.c dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS) DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ @@ -333,15 +333,15 @@ coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o coffdump_LDADD = $(LDADD) coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a coffdump_LDFLAGS = -dlltool_OBJECTS = dlltool.o defparse.o deflex.o dyn-string.o bucomm.o \ -version.o filemode.o +dlltool_OBJECTS = dlltool.o defparse.o deflex.o bucomm.o version.o \ +filemode.o dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a dlltool_LDFLAGS = windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \ rclex.o winduni.o resres.o bucomm.o version.o filemode.o windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a windres_LDFLAGS = -dllwrap_OBJECTS = dllwrap.o dyn-string.o version.o +dllwrap_OBJECTS = dllwrap.o version.o dllwrap_DEPENDENCIES = ../libiberty/libiberty.a dllwrap_LDFLAGS = size_OBJECTS = size.o bucomm.o version.o filemode.o @@ -414,7 +414,7 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) $(cxxfilt_SOURCES) OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) $(cxxfilt_OBJECTS) @@ -1250,7 +1250,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h debug.h dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \ dlltool.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h @@ -1344,11 +1344,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h -dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \ - dyn-string.h dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h dyn-string.h + $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h underscore.o: underscore.c diff --git a/binutils/dyn-string.c b/binutils/dyn-string.c deleted file mode 100644 index a164018..0000000 --- a/binutils/dyn-string.c +++ /dev/null @@ -1,107 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* This file lives in at least two places: binutils and gcc. - Don't change one without the other. */ - -#include "config.h" -#ifdef IN_GCC -#include "system.h" -#include "gansidecl.h" -#else -#include "ansidecl.h" -#endif -#include "dyn-string.h" - -extern char *xmalloc (); -extern char *xrealloc (); - -/* Create a new dynamic string capable of holding at least SPACE - characters, including the terminating NUL. If SPACE is 0, it - will be silently increased to 1. */ - -dyn_string_t -dyn_string_new (space) - int space; -{ - dyn_string_t result = (dyn_string_t) xmalloc (sizeof (struct dyn_string)); - - if (space == 0) - /* We need at least one byte in which to store the terminating - NUL. */ - space = 1; - - result->allocated = space; - result->s = (char*) xmalloc (space); - result->length = 0; - result->s[0] = '\0'; - - return result; -} - -/* Free the memory used by DS. */ - -void -dyn_string_delete (ds) - dyn_string_t ds; -{ - free (ds->s); - free (ds); -} - -/* Append the NUL-terminated string S to DS, resizing DS if - necessary. */ - -dyn_string_t -dyn_string_append (ds, s) - dyn_string_t ds; - char *s; -{ - int len = strlen (s); - dyn_string_resize (ds, ds->length + len + 1 /* '\0' */); - strcpy (ds->s + ds->length, s); - ds->length += len; - - return ds; -} - -/* Increase the capacity of DS so that it can hold at least SPACE - characters, including the terminating NUL. This function will not - (at present) reduce the capacity of DS. */ - -dyn_string_t -dyn_string_resize (ds, space) - dyn_string_t ds; - int space; -{ - int new_allocated = ds->allocated; - - while (space > new_allocated) - new_allocated *= 2; - - if (new_allocated != ds->allocated) - { - /* We actually need more space. */ - ds->allocated = new_allocated; - ds->s = (char*) xrealloc (ds->s, ds->allocated); - } - - return ds; -} diff --git a/binutils/dyn-string.h b/binutils/dyn-string.h deleted file mode 100644 index cbd25c3..0000000 --- a/binutils/dyn-string.h +++ /dev/null @@ -1,34 +0,0 @@ -/* An abstract string datatype. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Mark Mitchell (mark@markmitchell.com). - - This file is part of GNU CC. - - GNU CC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - GNU CC is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* This file lives in at least two places: binutils and gcc. - Don't change one without the other. */ - -typedef struct dyn_string -{ - int allocated; /* The amount of space allocated for the string. */ - int length; /* The actual length of the string. */ - char *s; /* The string itself, NUL-terminated. */ -}* dyn_string_t; - -extern dyn_string_t dyn_string_new PARAMS((int)); -extern void dyn_string_delete PARAMS((dyn_string_t)); -extern dyn_string_t dyn_string_append PARAMS((dyn_string_t, char*)); -extern dyn_string_t dyn_string_resize PARAMS((dyn_string_t, int)); |