1 Star 0 Fork 25

hanshuang/binutils

forked from src-anolis-os/binutils 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
binutils-plugin-error.patch 1.45 KB
Copy Edit Raw Blame History
--- binutils.orig/bfd/plugin.c 2022-01-19 16:17:33.290999966 +0000
+++ binutils-2.30/bfd/plugin.c 2022-01-19 16:23:33.704473426 +0000
@@ -349,7 +349,7 @@ try_claim (bfd *abfd)
}
static int
-try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p)
+try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p, bfd_boolean build_list_p)
{
void *plugin_handle;
struct ld_plugin_tv tv[4];
@@ -362,7 +362,11 @@ try_load_plugin (const char *pname, bfd
plugin_handle = dlopen (pname, RTLD_NOW);
if (!plugin_handle)
{
- _bfd_error_handler ("%s\n", dlerror ());
+ /* If we are building a list of viable plugins, then
+ we do not bother the user with the details of any
+ plugins that cannot be loaded. */
+ if (! build_list_p)
+ _bfd_error_handler ("%s\n", dlerror ());
return 0;
}
@@ -477,7 +481,7 @@ load_plugin (bfd *abfd)
return found;
if (plugin_name)
- return try_load_plugin (plugin_name, abfd, &has_plugin);
+ return try_load_plugin (plugin_name, abfd, &has_plugin, FALSE);
if (plugin_program_name == NULL)
return found;
@@ -501,7 +505,7 @@ load_plugin (bfd *abfd)
full_name = concat (p, "/", ent->d_name, NULL);
if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode))
- found = try_load_plugin (full_name, abfd, &valid_plugin);
+ found = try_load_plugin (full_name, abfd, &valid_plugin, TRUE);
if (has_plugin <= 0)
has_plugin = valid_plugin;
free (full_name);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hanshuang123456/binutils.git
git@gitee.com:hanshuang123456/binutils.git
hanshuang123456
binutils
binutils
a8

Search

23e8dbc6 1850385 7e0993f3 1850385