diff --git a/binutils.changes b/binutils.changes index f9e01bf..8e2c7fa 100644 --- a/binutils.changes +++ b/binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-aarch64-binutils.changes b/cross-aarch64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-aarch64-binutils.changes +++ b/cross-aarch64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-arm-binutils.changes b/cross-arm-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-arm-binutils.changes +++ b/cross-arm-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-avr-binutils.changes b/cross-avr-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-avr-binutils.changes +++ b/cross-avr-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-epiphany-binutils.changes b/cross-epiphany-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-epiphany-binutils.changes +++ b/cross-epiphany-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-hppa-binutils.changes b/cross-hppa-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-hppa-binutils.changes +++ b/cross-hppa-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-hppa64-binutils.changes b/cross-hppa64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-hppa64-binutils.changes +++ b/cross-hppa64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-i386-binutils.changes b/cross-i386-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-i386-binutils.changes +++ b/cross-i386-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-ia64-binutils.changes b/cross-ia64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-ia64-binutils.changes +++ b/cross-ia64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-m68k-binutils.changes b/cross-m68k-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-m68k-binutils.changes +++ b/cross-m68k-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-mips-binutils.changes b/cross-mips-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-mips-binutils.changes +++ b/cross-mips-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-ppc-binutils.changes b/cross-ppc-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-ppc-binutils.changes +++ b/cross-ppc-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-ppc64-binutils.changes b/cross-ppc64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-ppc64-binutils.changes +++ b/cross-ppc64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-ppc64le-binutils.changes b/cross-ppc64le-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-ppc64le-binutils.changes +++ b/cross-ppc64le-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-riscv64-binutils.changes b/cross-riscv64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-riscv64-binutils.changes +++ b/cross-riscv64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-rx-binutils.changes b/cross-rx-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-rx-binutils.changes +++ b/cross-rx-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-s390-binutils.changes b/cross-s390-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-s390-binutils.changes +++ b/cross-s390-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-s390x-binutils.changes b/cross-s390x-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-s390x-binutils.changes +++ b/cross-s390x-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-sparc-binutils.changes b/cross-sparc-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-sparc-binutils.changes +++ b/cross-sparc-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-sparc64-binutils.changes b/cross-sparc64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-sparc64-binutils.changes +++ b/cross-sparc64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-spu-binutils.changes b/cross-spu-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-spu-binutils.changes +++ b/cross-spu-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-x86_64-binutils.changes b/cross-x86_64-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-x86_64-binutils.changes +++ b/cross-x86_64-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/cross-xtensa-binutils.changes b/cross-xtensa-binutils.changes index f9e01bf..8e2c7fa 100644 --- a/cross-xtensa-binutils.changes +++ b/cross-xtensa-binutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 16:12:52 UTC 2020 - Martin Liška + +- Update fix-try_load_plugin.patch to latest version. + ------------------------------------------------------------------- Tue Feb 18 12:48:26 UTC 2020 - Martin Liška diff --git a/fix-try_load_plugin.patch b/fix-try_load_plugin.patch index bb6c150..c363d41 100644 --- a/fix-try_load_plugin.patch +++ b/fix-try_load_plugin.patch @@ -1,4 +1,4 @@ -From e5310c1cd5735c5dc29988583871be8c59c11cea Mon Sep 17 00:00:00 2001 +From d9d92bacb7adb4bab0c26eb7458203345a0faf13 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 18 Feb 2020 04:22:34 -0800 Subject: [PATCH] plugin: Call dlclose before return in try_load_plugin @@ -10,11 +10,11 @@ before return. * plugin.c (plugin_list_entry): Remove handle. (try_load_plugin): Call dlclose before return. --- - bfd/plugin.c | 43 ++++++++++++++++++------------------------- - 1 file changed, 18 insertions(+), 25 deletions(-) + bfd/plugin.c | 39 ++++++++++++++++++--------------------- + 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/bfd/plugin.c b/bfd/plugin.c -index 47c3439042c..84b96a20733 100644 +index 47c3439042..93d562b9fe 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -126,7 +126,6 @@ message (int level ATTRIBUTE_UNUSED, @@ -25,7 +25,7 @@ index 47c3439042c..84b96a20733 100644 ld_plugin_claim_file_handler claim_file; ld_plugin_all_symbols_read_handler all_symbols_read; ld_plugin_all_symbols_read_handler cleanup_handler; -@@ -596,22 +595,12 @@ try_load_plugin (const char *pname, +@@ -596,22 +595,18 @@ try_load_plugin (const char *pname, struct plugin_list_entry *plugin_list_iter, bfd *abfd, bfd_boolean build_list_p) { @@ -35,10 +35,11 @@ index 47c3439042c..84b96a20733 100644 int i; ld_plugin_onload onload; enum ld_plugin_status status; -- -- /* NB: Each object is independent. Reuse the previous plugin from -- the last run will lead to wrong result. */ -- if (current_plugin) ++ int result = 0; + + /* NB: Each object is independent. Reuse the previous plugin from + the last run will lead to wrong result. */ + if (current_plugin) - { - if (current_plugin->handle) - dlclose (current_plugin->handle); @@ -46,11 +47,12 @@ index 47c3439042c..84b96a20733 100644 - offsetof (struct plugin_list_entry, next)); - current_plugin = NULL; - } -+ int result = 0; ++ memset (current_plugin, 0, ++ offsetof (struct plugin_list_entry, next)); if (plugin_list_iter) pname = plugin_list_iter->plugin_name; -@@ -628,12 +617,12 @@ try_load_plugin (const char *pname, +@@ -628,12 +623,12 @@ try_load_plugin (const char *pname, size_t length_plugin_name = strlen (pname) + 1; char *plugin_name = bfd_malloc (length_plugin_name); if (plugin_name == NULL) @@ -65,7 +67,7 @@ index 47c3439042c..84b96a20733 100644 } /* Make a copy of PNAME since PNAME from load_plugin () will be freed. */ -@@ -644,13 +633,13 @@ try_load_plugin (const char *pname, +@@ -644,13 +639,13 @@ try_load_plugin (const char *pname, plugin_list = plugin_list_iter; } @@ -82,7 +84,7 @@ index 47c3439042c..84b96a20733 100644 i = 0; tv[i].tv_tag = LDPT_MESSAGE; -@@ -703,28 +692,32 @@ try_load_plugin (const char *pname, +@@ -703,28 +698,30 @@ try_load_plugin (const char *pname, tv[i].tv_tag = LDPT_NULL; tv[i].tv_u.tv_val = 0; @@ -115,8 +117,6 @@ index 47c3439042c..84b96a20733 100644 + result = 1; + +short_circuit: -+ /* NB: Each object is independent. Reuse the previous plugin from -+ the last run will lead to wrong result. */ + dlclose (plugin_handle); + return result; }