annocheck: Improve test for LTO compiled binaries that do not have -Wall annotations. (#1906171)

This commit is contained in:
Nick Clifton 2020-12-10 11:48:06 +00:00
parent d7a90f1991
commit 409120aa01
4 changed files with 6 additions and 38 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/annobin-*.tar.xz
/annobin-9.51-1.fc34.src.rpm

View File

@ -1,36 +0,0 @@
--- a/gcc-plugin/annobin.cc 2020-12-02 11:59:10.000000000 +0100
+++ b/gcc-plugin/annobin.cc 2020-12-06 11:44:44.446266880 +0100
@@ -752,12 +752,12 @@ annobin_get_str_option_by_name (const ch
#if GCCPLUGIN_VERSION_MAJOR >= 11
/* GCC version 11 introduced the cl_vars array which provides offsets for
fields in global_options which are not handled by cl_options. */
- struct cl_var * var = cl_vars;
+ const struct cl_var * var = cl_vars;
- for (var = cl_vars; var->name != NULL; var ++)
- if (strmp (var->name, name) == 0)
+ for (var = cl_vars; var->var_name != NULL; var ++)
+ if (strcmp (var->var_name, name) == 0)
// FIXME: Cache the result ?
- return (const char *) (* (const char **) (((char *) annobin_global_options) + var->var_offset));
+ return * (const char **) (((char *) annobin_global_options) + var->var_offset);
annobin_inform (INFORM_VERBOSE, "WARN: gcc variable '%s' not found within cl_vars array", name);
#endif
@@ -772,12 +772,12 @@ annobin_get_int_option_by_name (const ch
#if GCCPLUGIN_VERSION_MAJOR >= 11
/* GCC version 11 introduced the cl_vars array which provides offsets for
fields in global_options which are not handled by cl_options. */
- struct cl_var * var = cl_vars;
+ const struct cl_var * var = cl_vars;
- for (var = cl_vars; var->name != NULL; var ++)
- if (strmp (var->name, name) == 0)
+ for (var = cl_vars; var->var_name != NULL; var ++)
+ if (strcmp (var->var_name, name) == 0)
// FIXME: Cache the result ?
- return (const int) (* (const int **) (((char *) annobin_global_options) + var->var_offset));
+ return * (int *) (((char *) annobin_global_options) + var->var_offset);
annobin_inform (INFORM_VERBOSE, "WARN: gcc variable '%s' not found within cl_vars array", name);
#endif

View File

@ -1,7 +1,7 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 9.50
Version: 9.51
Release: 1%{?dist}
License: GPLv3+
# ProtocolURL: https://fedoraproject.org/wiki/Toolchain/Watermark
@ -323,6 +323,9 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Thu Dec 10 2020 Nick Clifton <nickc@redhat.com> - 9.51-1
- annocheck: Improve test for LTO compiled binaries that do not have -Wall annotations. (#1906171)
* Wed Dec 09 2020 Nick Clifton <nickc@redhat.com> - 9.50-1
- annocheck: Mark a missining -D_FORTIFY_SOURCE as a FAIL.

View File

@ -1 +1 @@
SHA512 (annobin-9.50.tar.xz) = 9ed047624be13c1838e7d247103f760d78f96d5b1172a29d3032c9ff797a97d68b451cc04b04e64632fbaf6b59e2cac50da03b655505a718d660ce322432a5ee
SHA512 (annobin-9.51.tar.xz) = 75e018b5fa4637ee565d2f7e72f1651e2d1764c4b78c807992af74f0e93b7f1ab5c20b3f6e99b18785d0629f76e88458f085e81403bb5e0e0a89ede75cc9f12c