2010-06-15 Rafael Espindola <espindola@google.com>
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Tue, 15 Jun 2010 19:22:25 +0000 (19:22 +0000)
committerRafael Ávila de Espíndola <respindola@mozilla.com>
Tue, 15 Jun 2010 19:22:25 +0000 (19:22 +0000)
* plugin.cc (Plugin_hook::run): Set in_real_elf for the start symbol.

gold/ChangeLog
gold/plugin.cc

index 5c63a9ace7118715e7a2aa6b4b2a6a799dcd6508..b7bff3b7cfae66b6eca7a4b7cba7b4ceaae22fe0 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-15  Rafael Espindola  <espindola@google.com>
+
+       * plugin.cc (Plugin_hook::run): Set in_real_elf for the start symbol.
+
 2010-06-15  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
 
        * fileread.cc: Only #include <sys/uio.h> if HAVE_READV.
index 798b601e709458f14c8adbdff15da2c296cd6bc1..4cf2f6a4547b5630d90fd32dd0994f0500c4572b 100644 (file)
@@ -916,6 +916,14 @@ void
 Plugin_hook::run(Workqueue* workqueue)
 {
   gold_assert(this->options_.has_plugins());
+  Symbol* start_sym;
+  if (parameters->options().entry())
+    start_sym = this->symtab_->lookup(parameters->options().entry());
+  else
+    start_sym = this->symtab_->lookup("_start");
+  if (start_sym != NULL)
+    start_sym->set_in_real_elf();
+
   this->options_.plugins()->all_symbols_read(workqueue,
                                              this,
                                              this->input_objects_,