Binutils: Always skip only 1 byte for CIE version 1's return address register.
[deliverable/binutils-gdb.git] / ld / plugin.c
index fad8bc0e38ba5bcba9a42231bb520f083ddb169a..ea1a7f70645d339d8346b365f4b2a20f2686519d 100644 (file)
@@ -1,5 +1,5 @@
 /* Plugin control for the GNU linker.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2019 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 
@@ -625,8 +625,6 @@ static inline bfd_boolean
 is_visible_from_outside (struct ld_plugin_symbol *lsym,
                         struct bfd_link_hash_entry *blhe)
 {
-  struct bfd_sym_chain *sym;
-
   if (bfd_link_relocatable (&link_info))
     return TRUE;
   if (blhe->non_ir_ref_dynamic
@@ -658,11 +656,6 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym,
              || lsym->visibility == LDPV_PROTECTED);
     }
 
-  for (sym = &entry_symbol; sym != NULL; sym = sym->next)
-    if (sym->name
-       && strcmp (sym->name, blhe->root.string) == 0)
-      return TRUE;
-
   return FALSE;
 }
 
@@ -1053,14 +1046,10 @@ plugin_call_claim_file (const struct ld_plugin_input_file *file, int *claimed)
     {
       if (curplug->claim_file_handler)
        {
-         off_t cur_offset;
          enum ld_plugin_status rv;
 
          called_plugin = curplug;
-         cur_offset = lseek (file->fd, 0, SEEK_CUR);
          rv = (*curplug->claim_file_handler) (file, claimed);
-         if (!*claimed)
-           lseek (file->fd, cur_offset, SEEK_SET);
          called_plugin = NULL;
          if (rv != LDPS_OK)
            set_plugin_error (curplug->name);
@@ -1126,12 +1115,6 @@ plugin_object_p (bfd *ibfd)
     }
 
   file.handle = input;
-  /* The plugin API expects that the file descriptor won't be closed
-     and reused as done by the bfd file cache.  So dup one.  */
-  file.fd = dup (file.fd);
-  if (file.fd < 0)
-    return NULL;
-
   input->abfd = abfd;
   input->view_buffer.addr = NULL;
   input->view_buffer.filesize = 0;
This page took 0.024325 seconds and 4 git commands to generate.