Check for DISASSEMBLER_NEEDS_RELOCS in objdump and read in relocs if set.
+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
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
MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@
OBJDUMP = @OBJDUMP@
+OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
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
BUILD_WINDRES=
BUILD_DLLWRAP=
BUILD_MISC=
+OBJDUMP_DEFS=
for targ in $target $canon_targets
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"
+
cat >> confdefs.h <<EOF
#define TARGET "${target}"
EOF
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
BUILD_WINDRES=
BUILD_DLLWRAP=
BUILD_MISC=
+OBJDUMP_DEFS=
for targ in $target $canon_targets
do
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
AC_SUBST(BUILD_WINDRES)
AC_SUBST(BUILD_DLLWRAP)
AC_SUBST(BUILD_MISC)
+AC_SUBST(OBJDUMP_DEFS)
AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
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);
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;
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;
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"
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 ""
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 ""