This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Regression due to objdump change with "[PATCH] Fix objdump -p not to truncate 64-bit values"

On Thu, 20 Mar 2008, Adam Nemet wrote:
> 	* elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
> 	print the values from the dynamic section.

This patch caused a regression for cris-elf ld testsuite, where
objdump is used.  My autotester runs on a 64-bit host, but using
"gcc -m32" also produced, after your patch:

Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-cris/cris.exp ...
FAIL: ld-cris/libdso-10

Your patch changed output, introducing zeros:

/tmp/hpautotest-binutils/criself/ld/../binutils/objdump  -p -h tmpdir/dump > tmpdir/dump.out
Executing on host: sh -c {/tmp/hpautotest-binutils/criself/ld/../binutils/objdump  -p -h tmpdir/dump > tmpdir/dump.out 2>ld.tmp}
/dev/null  (timeout = 300)
regexp_diff match failure
regexp "^  HASH.*0x94$"
line   "  HASH                 0x00000094"
... (more lines pruned)
FAIL: ld-cris/libdso-10

fixed with the attached patch, committed.  Was this really the
only fallout?, looks quite plausible.

The point is that one who changes the (output of the) tools have
to adjust the testsuite to match.  We made it a rule, but I'm
not sure if or where it was written down.

	* ld-cris/libdso-10.d: Adjust for change in objdump output.

Index: ld-cris/libdso-10.d
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-10.d,v
retrieving revision 1.11
diff -p -u -r1.11 libdso-10.d
--- ld-cris/libdso-10.d	27 Feb 2008 17:06:42 -0000	1.11
+++ ld-cris/libdso-10.d	22 Mar 2008 12:19:56 -0000
@@ -15,11 +15,11 @@ Program Header:
  DYNAMIC off    0x0+144 vaddr 0x0+2144 paddr 0x0+2144 align 2\*\*2
          filesz 0x0+58 memsz 0x0+58 flags rw-
 Dynamic Section:
-  HASH.*0x94
-  STRTAB.*0x120
-  SYMTAB.*0xc0
-  STRSZ.*0x1f
-  SYMENT.*0x10
+  HASH.*0x0*94
+  STRTAB.*0x0*120
+  SYMTAB.*0x0*c0
+  STRSZ.*0x0*1f
+  SYMENT.*0x0*10
 private flags = 2: \[v32\]
 Idx Name          Size      VMA       LMA       File off  Algn

brgds, H-P

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]