[03/16] scripts/versions.awk: Add local: * to all version nodes

Message ID 1d01e695b5103609157347b5008d822c2fd02770.1622469908.git.fweimer@redhat.com
State New
Headers show
Series
  • Move libdl into libc
Related show

Commit Message

Zack Weinberg via Libc-alpha May 31, 2021, 2:11 p.m.
This requires that all exported symbol versions are listed in
Versions files.  It results in more consistent behavior across
architectures because previously, symbols could be exported
via explicit versioned_symbol and compat_symbol clauses if the
version node existed in some Versions file (without listing the
symbol) and it was not the base version for the library.
---
 scripts/versions.awk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

-- 
2.31.1

Comments

Zack Weinberg via Libc-alpha June 1, 2021, 7:23 p.m. | #1
On 31/05/2021 11:11, Florian Weimer via Libc-alpha wrote:
> This requires that all exported symbol versions are listed in

> Versions files.  It results in more consistent behavior across

> architectures because previously, symbols could be exported

> via explicit versioned_symbol and compat_symbol clauses if the

> version node existed in some Versions file (without listing the

> symbol) and it was not the base version for the library.


LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>


> ---

>  scripts/versions.awk | 6 +-----

>  1 file changed, 1 insertion(+), 5 deletions(-)

> 

> diff --git a/scripts/versions.awk b/scripts/versions.awk

> index 3291123666..a7154480e3 100644

> --- a/scripts/versions.awk

> +++ b/scripts/versions.awk

> @@ -95,10 +95,7 @@ function ord(c) {

>  

>  

>  function closeversion(name, oldname) {

> -  if (firstinfile) {

> -    printf("  local:\n    *;\n") > outfile;

> -    firstinfile = 0;

> -  }

> +  printf("  local:\n    *;\n") > outfile;

>    # This version inherits from the last one only if they

>    # have the same nonnumeric prefix, i.e. GLIBC_x.y and GLIBC_x.z

>    # or FOO_x and FOO_y but not GLIBC_x and FOO_y.

> @@ -157,7 +154,6 @@ END {

>        oldlib = $1;

>        real_outfile = buildroot oldlib ".map";

>        outfile = real_outfile "T";

> -      firstinfile = 1;

>        veryoldver = "";

>        printf(" %s.map", oldlib);

>      }

>

Patch

diff --git a/scripts/versions.awk b/scripts/versions.awk
index 3291123666..a7154480e3 100644
--- a/scripts/versions.awk
+++ b/scripts/versions.awk
@@ -95,10 +95,7 @@  function ord(c) {
 
 
 function closeversion(name, oldname) {
-  if (firstinfile) {
-    printf("  local:\n    *;\n") > outfile;
-    firstinfile = 0;
-  }
+  printf("  local:\n    *;\n") > outfile;
   # This version inherits from the last one only if they
   # have the same nonnumeric prefix, i.e. GLIBC_x.y and GLIBC_x.z
   # or FOO_x and FOO_y but not GLIBC_x and FOO_y.
@@ -157,7 +154,6 @@  END {
       oldlib = $1;
       real_outfile = buildroot oldlib ".map";
       outfile = real_outfile "T";
-      firstinfile = 1;
       veryoldver = "";
       printf(" %s.map", oldlib);
     }