summaryrefslogtreecommitdiffstats
path: root/binutils
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-05-25 04:28:56 +0000
committerKen Raeburn <raeburn@cygnus>1993-05-25 04:28:56 +0000
commitf50af42bbf2a269b78b4ff916aed6b311b96812b (patch)
tree0abcbb89f9a0029b2d97eb11805febcf27338aaf /binutils
parent8a6d5d4f93d9817ab7490ab24b36ee1b3f62b3db (diff)
downloadppe42-binutils-f50af42bbf2a269b78b4ff916aed6b311b96812b.tar.gz
ppe42-binutils-f50af42bbf2a269b78b4ff916aed6b311b96812b.zip
Makefile.in (DISTSTUFF): Don't build binutils.mm.
objdump.c (slurp_symtab): Print warning for bad symbol table.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog14
-rw-r--r--binutils/Makefile.in32
-rw-r--r--binutils/objdump.c11
3 files changed, 46 insertions, 11 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 8cb045d65f..0c78ef83d5 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,19 @@
+Tue May 25 00:26:47 1993 Ken Raeburn (raeburn@cygnus.com)
+
+ * objdump.c (slurp_symtab): Print warning for bad symbol table.
+
+ * Makefile.in (DISTSTUFF): Don't build binutils.mm.
+
Fri May 21 10:51:19 1993 David J. Mackenzie (djm@rtl.cygnus.com)
+ * nm.c: Add -f/--format, -P/--portability, -t/--radix options.
+ Make global variables static.
+ (main): Make -v like -n, not -V, and make -A like -o, for POSIX.2.
+ (set_print_radix, set_output_format,
+ print_{object_filename,archive_filename,archive_member,symbol_info}
+ {bsd,sysv,posix}): New functions.
+ (display_file, print_symbols): Call them.
+
* ar.c: Improve error messages.
* nm.c (main): Handle long options that just set a flag.
diff --git a/binutils/Makefile.in b/binutils/Makefile.in
index 865d90f3be..7e6edd189b 100644
--- a/binutils/Makefile.in
+++ b/binutils/Makefile.in
@@ -57,6 +57,8 @@ RANLIB = ranlib
BISONFLAGS = -d
TEXI2ROFF=texi2roff
+NM_FOR_TARGET = nm
+NM = $(NM_FOR_TARGET)
SYMLINK = ln -s
BISON = `if [ -f ../byacc/byacc ] ; then echo ../byacc/byacc ; else echo byacc ; fi`
@@ -65,7 +67,7 @@ LEX_OPTIONS = -I -Cem
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
# Distribution version
-VERSION=2.1
+VERSION=2.2
# Distribution name
DIST_NAME=binutils-${VERSION}
@@ -96,7 +98,7 @@ DEMANGLER_PROG=c++filt
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG)
STAGESTUFF = $(PROGS) *.o
# Files that can be generated, but should be in the distribution.
-DISTSTUFF=arparse.c arlex.c binutils.mm
+DISTSTUFF=arparse.c arlex.c
BASEDIR = $(srcdir)/..
LIBDIR = ./../bfd
@@ -194,8 +196,22 @@ $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
$(OBJDUMP_PROG): $(ADDL_LIBS) size.o objdump.o $(BFD) $(OPCODES)
$(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(LOADLIBES)
-$(DEMANGLER_PROG): $(LIBIBERTY_SRC_DIR)/cplus-dem.c
- $(CC) $(LDFLAGS) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DMAIN -o $(DEMANGLER_PROG) $(LIBIBERTY_SRC_DIR)/cplus-dem.c $(LIBIBERTY) $(LOADLIBES)
+underscore.c:
+ echo "int xxy_us_dummy;" >dummy.c
+ $(CC) -c dummy.c
+ echo '/*WARNING: This file is automatically generated!*/' >underscore.c
+ if [ "`$(NM) dummy.o | grep _xxy_us_dummy`" != "" ]; then \
+ echo "int prepends_underscore = 1;" >>underscore.c; \
+ else \
+ echo "int prepends_underscore = 0;" >>underscore.c; \
+ fi
+ -rm -f dummy.c dummy.o
+
+cplus-dem.o: $(LIBIBERTY_SRC_DIR)/cplus-dem.c
+ $(CC) -c -DMAIN $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(LIBIBERTY_SRC_DIR)/cplus-dem.c
+
+$(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(LOADLIBES) underscore.o
arparse.c:arparse.y
$(BISON) $(BISONFLAGS) $(srcdir)/arparse.y
@@ -336,7 +352,7 @@ binutils.me: $(srcdir)/binutils.texi
mostlyclean:
-rm -f *.o *~ \#* core binutils.?? binutils.???
clean: mostlyclean
- -rm -f $(PROGS)
+ -rm -f $(PROGS) underscore.c
distclean: clean
-rm -f Makefile config.status sysdep.h
realclean: distclean
@@ -386,11 +402,11 @@ clean-info:
# Sanitize
# cd {HERE}; make dist [-f Makefile.in]
-dist: $(DIST_NAME).tar.Z
+dist: $(DIST_NAME).tar.z
diststuff: $(DISTSTUFF)
-$(DIST_NAME).tar.Z:
+$(DIST_NAME).tar.z:
cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
make diststuff -f Makefile.in
cd ../ld; make diststuff -f Makefile.in
@@ -400,7 +416,7 @@ $(DIST_NAME).tar.Z:
mv ../configure.in tmp; \
sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
cd ..; chmod og=u `find . -print`
- cd ../..; tar chf - $(DIST_NAME) | compress >$(DIST_NAME).tar.Z
+ cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
rm -rf ../../$(DIST_NAME)
# These get around a bug in Sun Make in SunOS 4.1.1
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 545293b8da..fb63668891 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -88,10 +88,9 @@ dump_symbols PARAMS ((bfd *abfd));
void
usage ()
{
- fprintf (stderr, "objdump %s\n\
+ fprintf (stderr, "\
Usage: %s [-ahifdrtxsl] [-m machine] [-j section_name] [-b bfdname]\n\
- [--syms] [--reloc] [--header] [--version] objfile...\n",
- program_version, program_name);
+ [--syms] [--reloc] [--header] [--version] objfile...\n", program_name);
exit (1);
}
@@ -172,6 +171,12 @@ DEFUN (slurp_symtab, (abfd),
}
}
symcount = bfd_canonicalize_symtab (abfd, sy);
+ if (symcount <= 0)
+ {
+ fprintf (stderr, "%s: Bad symbol table in \"%s\".\n",
+ program_name, bfd_get_filename (abfd));
+ exit (1);
+ }
return sy;
}
OpenPOWER on IntegriCloud