Check section index as well as object when looking for input section.
authorIan Lance Taylor <iant@google.com>
Sun, 23 Sep 2007 03:17:38 +0000 (03:17 +0000)
committerIan Lance Taylor <iant@google.com>
Sun, 23 Sep 2007 03:17:38 +0000 (03:17 +0000)
gold/output.cc

index 9fc31031387012839a559c39bc70dedad37a086d..6d782e2772a04e1aa55b15a45b65158489ee5ccf 100644 (file)
@@ -839,7 +839,8 @@ Output_section::Input_section::output_address(const Relobj* object,
                                          output_section_address, poutput);
   else
     {
-      if (this->u2_.object != object)
+      if (this->shndx_ != shndx
+         || this->u2_.object != object)
        return false;
       off_t output_offset;
       Output_section* os = object->output_section(shndx, &output_offset);