[gold][patch] Set the target in make_sized_incremental_binary

Rafael Espindola espindola@google.com
Thu Dec 3 03:42:00 GMT 2009


> You have to call set_parameters_target after the check for whether
> target == NULL.
>
> For safety, it should also check the existing target as in object.cc:
>
>  if (!parameters->target_valid())
>    set_parameters_target(target);
>  else if (target != &parameters->target())
>    gold_error(_("%s: incompatible target"), this->output_name_);

Updated patch attached. I added the name of the file as a function
argument as is done in object.cc.  Another option would be to add a
get_name to Output_file.

2009-12-02  Rafael Avila de Espindola  <espindola@google.com>

	* incremental-dump.cc (main): Update call to open_incremental_binary.
	* incremental.cc (make_sized_incremental_binary): Set the target.
	Error if it is incompatible.
	(open_incremental_binary): Add a name argument. Pass it to
	make_sized_incremental_binary.
	(Incremental_checker::can_incrementally_link_output_file): Update
	call to open_incremental_binary.
	* incremental.h (open_incremental_binary): Add a name argument.

> Ian
>

Thanks,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: target.patch
Type: text/x-diff
Size: 4119 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091203/bda2cec5/attachment.bin>


More information about the Binutils mailing list