[PATCH 0/3] binutils: read from stdin if input file is -

Nick Clifton nickc@redhat.com
Tue Feb 20 14:31:00 GMT 2018

Hi Ahmad,

> Changes behavior of dlltool, nlmconv, nm, objcopy, objdump and size
> to allow niftiness like:
>     printf "\xCC" | objdump -D -bbinary -mi386 -
> Affects the layout of struct bfd as well. Is this ok?

Yes, but I would like to request a couple of additions:

  * Please add a patch to the binutils/NEWS file to mention
    this new behaviour.

  * Please update the binutils/doc/binutils.texi file to
    document the new behaviour.

  * It would be really nice if you could create a new test
    (or two) in the binutils testsuite to verify that the
    new behaviour works.  I am not sure how difficult this
    will be however.

One other thing.  In patch 1:

+      XDELETEVEC ((char *) abfd->temp_filename);

I think it would be nicer to just use free() here, rather
than XDELETEVEC, since make_temp_name does just return a malloc'ed
buffer.  Speaking of which:

+          nbfd->temp_filename = make_temp_file (NULL);

You need to check to see if make_temp_file() returned NULL here...


More information about the Binutils mailing list