This is the mail archive of the binutils@sourceware.org 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]

Re: [Patch] Add private dumper to objdump


On Mon, May 16, 2011 at 6:41 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, May 16, 2011 at 6:35 AM, Hans-Peter Nilsson
> <hans-peter.nilsson@axis.com> wrote:
>>> From: Tristan Gingold <gingold@adacore.com>
>>> Date: Mon, 16 May 2011 14:22:32 +0200
>>
>>> On May 10, 2011, at 4:46 AM, Alan Modra wrote:
>>>
>>> > On Thu, May 05, 2011 at 04:27:38PM +0200, Tristan Gingold wrote:
>>> >> ? ?* od-xcoff.c: New file.
>>> >> ? ?* objdump.h: New file.
>>> >> ? ?* objdump.c: Include objdump.h
>>> >> ? ?(dump_private_options, objdump_private_vectors): New variables.
>>> >> ? ?(usage): Mention -P/--private. ?Display handled options.
>>> >> ? ?(long_options): Add -P/--private.
>>> >> ? ?(dump_target_specific): New function.
>>> >> ? ?(dump_bfd): Handle dump_private_options.
>>> >> ? ?(main): Handle -P.
>>> >> ? ?* doc/binutils.texi (objdump): Document -P/--private.
>>> >> ? ?* configure.in (OBJDUMP_PRIVATE_VECTORS, OBJDUMP_PRIVATE_OFILES):
>>> >> ? ?New variables, compute them.
>>> >> ? ?(od_vectors): Add vectors for private dumpers. Make them uniq.
>>> >> ? ?(OBJDUMP_DEFS): Add OBJDUMP_PRIVATE_VECTORS.
>>> >> ? ?* Makefile.am (HFILES): Add objdump.h
>>> >> ? ?(CFILES): Add od-xcoff.c
>>> >> ? ?(OBJDUMP_PRIVATE_OFILES): New variable.
>>> >> ? ?(objdump_DEPENDENCIES): Append OBJDUMP_PRIVATE_OFILES.
>>> >> ? ?(objdump_LDADD): Ditto.
>>> >> ? ?(EXTRA_objdump_SOURCES): Define.
>>> >> ? ?* Makefile.in: Regenerate.
>>> >> ? ?* configure: Regenerate.
>>> >
>>> > OK.
>>>
>>> Thanks, committed.
>
> There is no ChangeLog entry.

I will fix it.

>> Looks like you missed updating the test-suite. ?Changing the
>> format of objdump or readelf requires that. ?My autotester
>> complains for cris-axis-elf and cris-axis-linux-gnu:
>>
>> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-scripts/phdrs.exp ...
>> FAIL: PHDRS
>> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-scripts/phdrs2.exp ...
>> FAIL: PHDRS2
>>
>> But, I can't trivially figure out why the test-suite fails as it
>> does; it looks like the same thing would happen for all
>> architectures and the failure mode is weird. ?Quoting the ld.log
>> for the first failure ("same" for the second):
>
> The problem is we have
>
> ?-p, --private-headers ? ?Display object format specific file header contents
>
> and we support short and unambiguous names.
>

I checked in this.

-- 
H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 11383be..0874ab4 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* ld-scripts/phdrs.exp: Replace --private with
+	--private-headers for objdump.
+	* ld-scripts/phdrs2.exp: Likewise.
+
 2011-05-15  Richard Sandiford  <rdsandiford@googlemail.com>

 	* lib/ld-lib.exp (run_ld_link_tests): Simplify pass/fail logic.
diff --git a/ld/testsuite/ld-scripts/phdrs.exp
b/ld/testsuite/ld-scripts/phdrs.exp
index a112d3a..c4e5699 100644
--- a/ld/testsuite/ld-scripts/phdrs.exp
+++ b/ld/testsuite/ld-scripts/phdrs.exp
@@ -56,7 +56,7 @@ if ![ld_simple_link $ld tmpdir/phdrs $ldopt] {
 	unresolved $testname
 	return
     }
-    set exec_output [run_host_cmd "$objdump" "--private tmpdir/phdrs"]
+    set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs"]
     set exec_output [prune_warnings $exec_output]
     verbose -log $exec_output

diff --git a/ld/testsuite/ld-scripts/phdrs2.exp
b/ld/testsuite/ld-scripts/phdrs2.exp
index e75acfb..b680d85 100644
--- a/ld/testsuite/ld-scripts/phdrs2.exp
+++ b/ld/testsuite/ld-scripts/phdrs2.exp
@@ -63,7 +63,7 @@ if ![ld_simple_link $ld tmpdir/phdrs2 $ldopt] {
 	return
     }

-    set exec_output [run_host_cmd "$objdump" "--private tmpdir/phdrs2"]
+    set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs2"]
     set exec_output [prune_warnings $exec_output]
     verbose -log $exec_output


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