Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2018 22:26:41 +0100
From:      Alexander Richardson <arichardson@freebsd.org>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        Ed Maste <emaste@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>,  "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org>
Subject:   Re: Tool Chain Migration: objdump users, please test llvm-objdump
Message-ID:  <CA%2BZ_v8rzL83Okabw--Az55wHnTVw=RanWH0yHoVNrqtfMpTJGg@mail.gmail.com>
In-Reply-To: <20180620155022.GA92001@spindle.one-eyed-alien.net>
References:  <CAPyFy2BYOhNFkNGGMSKgpN%2BxV=FvrLtSHc0DH3WQjQe2a9beeg@mail.gmail.com> <20180620155022.GA92001@spindle.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 20 Jun 2018 at 16:50 Brooks Davis <brooks@freebsd.org> wrote:

> On Wed, Jun 20, 2018 at 10:46:46AM -0400, Ed Maste wrote:
> > Work is in progress to migrate fully to modern and permissively
> > licensed components for the tool chain. This includes moving away from
> > the three obsolete binutils components that are still in the base
> > system (as, ld, objdump). objdump is a tool to report information
> > about binary objects (such as headers, symbols, etc.), is not required
> > as a build tool, and in any case many uses of objdump are better
> > served by readelf.
> >
> > For FreeBSD 12 I intend to remove GNU objdump 2.17.50. PR 229046[1] is
> > open to track tasks related to its removal, and users who need GNU
> > objdump can install an up-to-date version from the ports tree or the
> > binutils package.
> >
> > That said, llvm includes a somewhat equivalent llvm-objdump, and it is
> > built by default in FreeBSD now. If llvm-objdump's command line option
> > support and output format is "close enough" to GNU objdump for most
> > users we may decide to install it as /usr/bin/objdump. Therefore, I
> > would like to ask users of GNU objdump in FreeBSD to give llvm-objdump
> > a try. Please let me know if it works for your uses, or describe
> > deficiencies that you found.
>
> I think we've changed our flag us in CheriBSD to accommodate llvm-objdump
> so at least a few months ago flag compatibility was poor.  The output is
> different, but fine for my uses (producing human readable assembly
> output).
>
>
When I made the change to use llvm-objdump in CheriBSD I had to change the
objdump flags from -xrsSd to -r -s -p -S -d -h -l -t.

This is because llvm-objdump doesn't support the -x option and doesn't
accept joined single-character options. I've been meaning to submit a patch
upstream for -x but haven't got around to it yet.
Otherwise the only noticeable change was that creating a full dump of any
binary is MUCH faster.

Alex



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BZ_v8rzL83Okabw--Az55wHnTVw=RanWH0yHoVNrqtfMpTJGg>