This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 0/3] binutils: read from stdin if input file is -
> On 20Feb 2018, at 15:31, Nick Clifton <firstname.lastname@example.org> wrote:
> 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.
Will see what I can do.
> 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
As make_temp_name uses XNEWVEC I thought it'd be safer to use its XDELETEVEC counterpart (which is, for now!, #defined as free),
but I can change it.
> Speaking of which:
> + nbfd->temp_filename = make_temp_file (NULL);
> You need to check to see if make_temp_file() returned NULL here...
make_temp_file aborts the process (via xmalloc) if it fails to allocate, so NULL check is superfluous.