Remove "boolean" and "var_boolean" checks from ARI
[deliverable/binutils-gdb.git] / gold / object.cc
index d505ce4752002b2bb2966f3ec1f94a7df4ec65e1..959cbc5f2768dc65b03fe1a9d6d6273670ef7822 100644 (file)
@@ -1884,10 +1884,15 @@ Sized_relobj_file<size, big_endian>::do_layout(Symbol_table* symtab,
       if (strncmp (name, lto_section_name, strlen (lto_section_name)) == 0)
        {
          section_size_type contents_len;
-         const unsigned char* pcontents = this->section_contents(i, &contents_len, false);
-         struct lto_section lsection = *(const lto_section*)pcontents;
-         if (lsection.slim_object)
-           layout->set_lto_slim_object ();
+         const unsigned char* pcontents
+           = this->section_contents(i, &contents_len, false);
+         if (contents_len >= sizeof(lto_section))
+           {
+             const lto_section* lsection
+               = reinterpret_cast<const lto_section*>(pcontents);
+             if (lsection->slim_object)
+               layout->set_lto_slim_object();
+           }
        }
     }
 
@@ -2641,6 +2646,10 @@ Sized_relobj_file<size, big_endian>::do_finalize_local_symbols(
              lv->set_output_symtab_index(index);
              ++index;
            }
+         if (lv->is_ifunc_symbol()
+             && (lv->has_output_symtab_entry()
+                 || lv->needs_output_dynsym_entry()))
+           symtab->set_has_gnu_output();
          break;
        case CFLV_DISCARDED:
        case CFLV_ERROR:
This page took 0.024487 seconds and 4 git commands to generate.