From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22942 invoked by alias); 16 May 2011 13:48:40 -0000 Received: (qmail 22891 invoked by uid 22791); 16 May 2011 13:48:37 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 May 2011 13:48:21 +0000 Received: by qwa26 with SMTP id 26so3123874qwa.0 for ; Mon, 16 May 2011 06:48:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.26.131 with SMTP id e3mr3181478qcc.254.1305553700075; Mon, 16 May 2011 06:48:20 -0700 (PDT) Received: by 10.229.182.7 with HTTP; Mon, 16 May 2011 06:48:19 -0700 (PDT) In-Reply-To: References: <43974448-D817-48FF-B7E8-1AE01EC9D0C9@adacore.com> <201105161335.p4GDZms9016712@ignucius.se.axis.com> Date: Mon, 16 May 2011 13:48:00 -0000 Message-ID: Subject: Re: [Patch] Add private dumper to objdump From: "H.J. Lu" To: Hans-Peter Nilsson Cc: gingold@adacore.com, binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00217.txt.bz2 On Mon, May 16, 2011 at 6:41 AM, H.J. Lu wrote: > On Mon, May 16, 2011 at 6:35 AM, Hans-Peter Nilsson > wrote: >>> From: Tristan Gingold >>> 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: >>> >> =A0 =A0* od-xcoff.c: New file. >>> >> =A0 =A0* objdump.h: New file. >>> >> =A0 =A0* objdump.c: Include objdump.h >>> >> =A0 =A0(dump_private_options, objdump_private_vectors): New variable= s. >>> >> =A0 =A0(usage): Mention -P/--private. =A0Display handled options. >>> >> =A0 =A0(long_options): Add -P/--private. >>> >> =A0 =A0(dump_target_specific): New function. >>> >> =A0 =A0(dump_bfd): Handle dump_private_options. >>> >> =A0 =A0(main): Handle -P. >>> >> =A0 =A0* doc/binutils.texi (objdump): Document -P/--private. >>> >> =A0 =A0* configure.in (OBJDUMP_PRIVATE_VECTORS, OBJDUMP_PRIVATE_OFIL= ES): >>> >> =A0 =A0New variables, compute them. >>> >> =A0 =A0(od_vectors): Add vectors for private dumpers. Make them uniq. >>> >> =A0 =A0(OBJDUMP_DEFS): Add OBJDUMP_PRIVATE_VECTORS. >>> >> =A0 =A0* Makefile.am (HFILES): Add objdump.h >>> >> =A0 =A0(CFILES): Add od-xcoff.c >>> >> =A0 =A0(OBJDUMP_PRIVATE_OFILES): New variable. >>> >> =A0 =A0(objdump_DEPENDENCIES): Append OBJDUMP_PRIVATE_OFILES. >>> >> =A0 =A0(objdump_LDADD): Ditto. >>> >> =A0 =A0(EXTRA_objdump_SOURCES): Define. >>> >> =A0 =A0* Makefile.in: Regenerate. >>> >> =A0 =A0* configure: Regenerate. >>> > >>> > OK. >>> >>> Thanks, committed. > > There is no ChangeLog entry. I will fix it. >> Looks like you missed updating the test-suite. =A0Changing the >> format of objdump or readelf requires that. =A0My 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. =A0Quoting the ld.log >> for the first failure ("same" for the second): > > The problem is we have > > =A0-p, --private-headers =A0 =A0Display object format specific file heade= r contents > > and we support short and unambiguous names. > I checked in this. --=20 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 + + * ld-scripts/phdrs.exp: Replace --private with + --private-headers for objdump. + * ld-scripts/phdrs2.exp: Likewise. + 2011-05-15 Richard Sandiford * 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/phd= rs"] 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/phd= rs2"] set exec_output [prune_warnings $exec_output] verbose -log $exec_output