about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-14 18:18:34 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-15 16:59:13 -0300
commit71e408e45dcacf429a94b2807f75aaadd8d37cb9 (patch)
tree4e07e77f4582f383dbed0302c62defdd2f5aa258
parentb712be52645282c706a5faa038242504feb06db5 (diff)
downloadglibc-71e408e45dcacf429a94b2807f75aaadd8d37cb9.tar.gz
glibc-71e408e45dcacf429a94b2807f75aaadd8d37cb9.tar.xz
glibc-71e408e45dcacf429a94b2807f75aaadd8d37cb9.zip
elf: Fix tst-relro-symbols.py argument passing
Current scheme only consideres the first argument for both --required
and --optional, where the idea is to append a new item.

Checked on x86_64-linux-gnu.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
-rw-r--r--elf/tst-relro-symbols.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/elf/tst-relro-symbols.py b/elf/tst-relro-symbols.py
index 368ea3349f..ea61024b5e 100644
--- a/elf/tst-relro-symbols.py
+++ b/elf/tst-relro-symbols.py
@@ -56,10 +56,10 @@ def get_parser():
     """Return an argument parser for this script."""
     parser = argparse.ArgumentParser(description=__doc__)
     parser.add_argument('object', help='path to object file to check')
-    parser.add_argument('--required', metavar='NAME', default=(),
-                        help='required symbol names', nargs='*')
-    parser.add_argument('--optional', metavar='NAME', default=(),
-                        help='required symbol names', nargs='*')
+    parser.add_argument('--required', metavar='NAME', action='append',
+                        default=[], help='required symbol names')
+    parser.add_argument('--optional', metavar='NAME', action='append',
+                        default=[], help='required symbol names')
     return parser
 
 def main(argv):