This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold][patch] Set the target in make_sized_incremental_binary


now with the patch.

2009/12/2 Rafael Espindola <espindola@google.com>:
> This patch sets the target in make_sized_incremental_binary. I think it is
> generally correct and we need something on these lines for
> incremental-dump: Since incremental-dump sees only one file, the target
> has to be set from it.
>
> 2009-12-02 ÂRafael Avila de Espindola Â<espindola@google.com>
>
> Â Â Â Â* incremental.cc (make_sized_incremental_binary): Set the target.
>
> Cheers,
> --
> Rafael Ãvila de EspÃndola
>



-- 
Rafael Ãvila de EspÃndola
diff --git a/gold/incremental.cc b/gold/incremental.cc
index 4af4ef3..6bcc657 100644
--- a/gold/incremental.cc
+++ b/gold/incremental.cc
@@ -326,6 +326,10 @@ make_sized_incremental_binary(Output_file* file,
   Target* target = select_target(ehdr.get_e_machine(), size, big_endian,
                                  ehdr.get_e_ident()[elfcpp::EI_OSABI],
                                  ehdr.get_e_ident()[elfcpp::EI_ABIVERSION]);
+
+  if (!parameters->target_valid())
+    set_parameters_target(target);
+
   if (target == NULL)
     {
       explain_no_incremental(_("unsupported ELF machine number %d"),

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]