diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-02-07 11:01:22 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-02-07 11:01:22 -0800 |
commit | 35a1e5f3055fc28f129e4d5d0a993218d8af1baf (patch) | |
tree | 620a7a1e2a37218fe5b68536d8586822f0b5940c /ld/ldfile.c | |
parent | 1952c5cd7d3d24b9647b396731bc4808a2d63d9c (diff) | |
download | gdb-35a1e5f3055fc28f129e4d5d0a993218d8af1baf.zip gdb-35a1e5f3055fc28f129e4d5d0a993218d8af1baf.tar.gz gdb-35a1e5f3055fc28f129e4d5d0a993218d8af1baf.tar.bz2 |
Update plugin_maybe_claim
This patch removes the argument of pointer to struct ld_plugin_input_file.
This is the first step to extract a plugin_object_p out of
plugin_maybe_claim for BFD.
* plugin.c: Include "libbfd.h".
(plugin_strdup): New.
(plugin_maybe_claim): Remove the argument of pointer to struct
ld_plugin_input_file. Open and handle input entry.
* plugin.h (plugin_maybe_claim): Updated.
* ldfile.c (ldfile_try_open_bfd): Call plugin_maybe_claim directly
without passing a pointer to struct ld_plugin_input_file.
* ldmain.c: Don't include "libbfd.h".
(add_archive_element): Call plugin_maybe_claim directly without
passing a pointer to struct ld_plugin_input_file.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index c9c9541..05889f2 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -304,19 +304,7 @@ success: if (bfd_check_format (entry->the_bfd, bfd_object) && link_info.lto_plugin_active && !no_more_claiming) - { - int fd = open (attempt, O_RDONLY | O_BINARY); - if (fd >= 0) - { - struct ld_plugin_input_file file; - - file.name = attempt; - file.offset = 0; - file.filesize = lseek (fd, 0, SEEK_END); - file.fd = fd; - plugin_maybe_claim (&file, entry); - } - } + plugin_maybe_claim (entry); #endif /* ENABLE_PLUGINS */ /* It opened OK, the format checked out, and the plugins have had |