diff options
author | Nick Clifton <nickc@redhat.com> | 2001-01-09 20:25:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-01-09 20:25:31 +0000 |
commit | 8b1e6df337acf62900dda4e8aad874b999563510 (patch) | |
tree | 09b817ba0eba8acb0858f9833f998dce9fd0b5b6 | |
parent | 8c1f9e76d2e75bd32925048a0ee9871aec6e81fe (diff) | |
download | gdb-8b1e6df337acf62900dda4e8aad874b999563510.zip gdb-8b1e6df337acf62900dda4e8aad874b999563510.tar.gz gdb-8b1e6df337acf62900dda4e8aad874b999563510.tar.bz2 |
Add OBJDUMP_DEFS to configure and makefile
Check for DISASSEMBLER_NEEDS_RELOCS in objdump and read in relocs if set.
-rw-r--r-- | binutils/ChangeLog | 15 | ||||
-rw-r--r-- | binutils/Makefile.am | 3 | ||||
-rw-r--r-- | binutils/Makefile.in | 4 | ||||
-rwxr-xr-x | binutils/configure | 6 | ||||
-rw-r--r-- | binutils/configure.in | 5 | ||||
-rw-r--r-- | binutils/objdump.c | 23 | ||||
-rw-r--r-- | binutils/po/binutils.pot | 40 |
7 files changed, 71 insertions, 25 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a2967db..2c9367e 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,18 @@ +2001-01-09 Nick Clifton <nickc@redhat.com> + + * Makefile.am: Add rule to build objdump.o from objdump.c and + using OBJDUMP_DEFS. + * Makefile.in: Regenerate. + + * configure.in: Define OBJDUMP_DEFS. Default to empty. + (arm, xscale, d10v): For these targets define OBJDUMP_DEFS to + -DDISASSEMBLER_NEEDS_RELOCS. + * confgiure: Regenerate. + + * objdump.c (disassemble_bytes): If DISASSEMBLER_NEEDS_RELOCS + is defined read in the relocs even if dump_reloc_info is + false. + 2001-01-07 Philip Blundell <philb@gnu.org> * binutils.texi (Bug Reporting): Replace `bug-gnu-utils' with diff --git a/binutils/Makefile.am b/binutils/Makefile.am index 1943067..1ddf2f7 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -171,6 +171,9 @@ nm_new_SOURCES = nm.c $(BULIBS) objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) +objdump.o:objdump.c + $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c + underscore.c: stamp-under ; @true stamp-under: Makefile diff --git a/binutils/Makefile.in b/binutils/Makefile.in index d6c2c36..1b2a296 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -100,6 +100,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NLMCONV_DEFS = @NLMCONV_DEFS@ OBJDUMP = @OBJDUMP@ +OBJDUMP_DEFS = @OBJDUMP_DEFS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ @@ -1098,6 +1099,9 @@ check-DEJAGNU: site.exp installcheck: /bin/sh $(srcdir)/sanity.sh $(bindir) +objdump.o:objdump.c + $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c + underscore.c: stamp-under ; @true stamp-under: Makefile diff --git a/binutils/configure b/binutils/configure index 3f6021b..bf0043e 100755 --- a/binutils/configure +++ b/binutils/configure @@ -5371,6 +5371,7 @@ DLLTOOL_DEFS= BUILD_WINDRES= BUILD_DLLWRAP= BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -5417,6 +5418,9 @@ do DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + arm-* | xscale-* | strongarm-* | d10v-*) + OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" + ;; i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" @@ -5464,6 +5468,7 @@ done + cat >> confdefs.h <<EOF #define TARGET "${target}" EOF @@ -5687,6 +5692,7 @@ s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g s%@BUILD_WINDRES@%$BUILD_WINDRES%g s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g s%@BUILD_MISC@%$BUILD_MISC%g +s%@OBJDUMP_DEFS@%$OBJDUMP_DEFS%g s%@UNDERSCORE@%$UNDERSCORE%g CEOF diff --git a/binutils/configure.in b/binutils/configure.in index 184855b..d175d85 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -171,6 +171,7 @@ DLLTOOL_DEFS= BUILD_WINDRES= BUILD_DLLWRAP= BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -219,6 +220,9 @@ changequote([,])dnl DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + arm-* | xscale-* | strongarm-* | d10v-*) + OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" + ;; changequote(,)dnl i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) changequote([,])dnl @@ -267,6 +271,7 @@ AC_SUBST(DLLTOOL_DEFS) AC_SUBST(BUILD_WINDRES) AC_SUBST(BUILD_DLLWRAP) AC_SUBST(BUILD_MISC) +AC_SUBST(OBJDUMP_DEFS) AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) diff --git a/binutils/objdump.c b/binutils/objdump.c index cc31746..a665831 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1358,13 +1358,15 @@ disassemble_bytes (info, disassemble_fn, insns, data, info->bytes_per_line = 0; info->bytes_per_chunk = 0; +#ifdef DISASSEMBLER_NEEDS_RELOCS /* FIXME: This is wrong. It tests the number of octets in the last instruction, not the current one. */ if (*relppp < relppend && (**relppp)->address >= addr_offset - && (**relppp)->address < addr_offset + octets / opb) + && (**relppp)->address <= addr_offset + octets / opb) info->flags = INSN_HAS_RELOC; else +#endif info->flags = 0; octets = (*disassemble_fn) (section->vma + addr_offset, info); @@ -1504,12 +1506,20 @@ disassemble_bytes (info, disassemble_fn, insns, data, need_nl = true; } - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { while ((*relppp) < relppend && ((**relppp)->address >= (bfd_vma) addr_offset && (**relppp)->address < (bfd_vma) addr_offset + octets / opb)) +#ifdef DISASSEMBLER_NEEDS_RELOCS + if (! dump_reloc_info) + ++(*relppp); + else +#endif { arelent *q; @@ -1665,8 +1675,11 @@ disassemble_data (abfd) if (only != (char *) NULL && strcmp (only, section->name) != 0) continue; - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { long relsize; diff --git a/binutils/po/binutils.pot b/binutils/po/binutils.pot index 05dc739..7c50f2d 100644 --- a/binutils/po/binutils.pot +++ b/binutils/po/binutils.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-12-19 14:20-0800\n" +"POT-Creation-Date: 2001-01-09 12:08-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -33,7 +33,7 @@ msgstr "" msgid "%s: can not get addresses from archive" msgstr "" -#: addr2line.c:310 nm.c:436 objdump.c:2844 +#: addr2line.c:310 nm.c:436 objdump.c:2857 #, c-format msgid "unknown demangling style `%s'" msgstr "" @@ -1866,98 +1866,98 @@ msgstr "" msgid "Out of virtual memory" msgstr "" -#: objdump.c:1606 +#: objdump.c:1616 #, c-format msgid "Can't use supplied machine %s" msgstr "" -#: objdump.c:1624 +#: objdump.c:1634 #, c-format msgid "Can't disassemble for architecture %s\n" msgstr "" -#: objdump.c:1703 +#: objdump.c:1716 #, c-format msgid "Disassembly of section %s:\n" msgstr "" -#: objdump.c:1877 +#: objdump.c:1890 #, c-format msgid "" "No %s section present\n" "\n" msgstr "" -#: objdump.c:1884 +#: objdump.c:1897 #, c-format msgid "%s has no %s section" msgstr "" -#: objdump.c:1898 +#: objdump.c:1911 #, c-format msgid "Reading %s section of %s failed: %s" msgstr "" -#: objdump.c:1910 +#: objdump.c:1923 #, c-format msgid "Reading %s section of %s failed: %s\n" msgstr "" -#: objdump.c:1953 +#: objdump.c:1966 #, c-format msgid "" "Contents of %s section:\n" "\n" msgstr "" -#: objdump.c:2053 +#: objdump.c:2066 #, c-format msgid "architecture: %s, " msgstr "" -#: objdump.c:2056 +#: objdump.c:2069 #, c-format msgid "flags 0x%08x:\n" msgstr "" -#: objdump.c:2069 +#: objdump.c:2082 msgid "" "\n" "start address 0x" msgstr "" -#: objdump.c:2101 +#: objdump.c:2114 #, c-format msgid "" "\n" "%s: file format %s\n" msgstr "" -#: objdump.c:2143 +#: objdump.c:2156 #, c-format msgid "%s: printing debugging information failed" msgstr "" -#: objdump.c:2220 +#: objdump.c:2233 #, c-format msgid "In archive %s:\n" msgstr "" -#: objdump.c:2272 +#: objdump.c:2285 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: objdump.c:2785 +#: objdump.c:2798 #, c-format msgid "BFD header file version %s\n" msgstr "" -#: objdump.c:2869 +#: objdump.c:2882 msgid "unrecognized -E option" msgstr "" -#: objdump.c:2880 +#: objdump.c:2893 #, c-format msgid "unrecognized --endian type `%s'" msgstr "" |