This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make __start/__stop symbols protected visibility


On Mon, Aug 21, 2017 at 4:52 AM, Alan Modra <amodra@gmail.com> wrote:
> This is what I have in mind to commit after some more testing.  I've
> made all __start_* and __stop_* protected visibility, and .startof.*
> and .sizeof.* symbols local.  Due to x86 setting extern_protected_data
> and arm foolishly IMO following suit, I decided to keep your
> SYMBOLIC_BIND patch even though I don't particularly like it.  It
> ought to be enough to simply make a symbol protected visibility to
> ensure it binds local.
>
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 6badc5d..15f1a3f 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,10 @@
> +2017-08-21  Alan Modra  <amodra@gmail.com>
> +           H.J. Lu  <hongjiu.lu@intel.com>
> +
> +       PR ld/21964
> +       * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
> +       * elflink.c (bfd_elf_define_start_stop): Rewrite.
> +

When SYMBOLIC_BIND is set, protected visibility no longer make any
senses.  Can you find a run-time testcase where protected visibibilty
leads to a different result?

>  2017-08-21  Hans-Peter Nilsson  <hp@bitrange.com>
>
>         PR ld/20125
> diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
> index 92a8e02..83958e4 100644
> --- a/bfd/elf-bfd.h
> +++ b/bfd/elf-bfd.h
> @@ -2802,7 +2802,9 @@ extern asection _bfd_elf_large_com_section;
>     library, if any.  A unique symbol can never be bound locally.  */
>  #define SYMBOLIC_BIND(INFO, H) \
>      (!(H)->unique_global \
> -     && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic)))
> +     && ((INFO)->symbolic \
> +        || (H)->start_stop \
> +        || ((INFO)->dynamic && !(H)->dynamic)))
>
>  #ifdef __cplusplus
>  }
> diff --git a/bfd/elflink.c b/bfd/elflink.c
> index f9886dc..ceacb37 100644
> --- a/bfd/elflink.c
> +++ b/bfd/elflink.c
> @@ -14260,18 +14260,30 @@ struct bfd_link_hash_entry *
>  bfd_elf_define_start_stop (struct bfd_link_info *info,
>                            const char *symbol, asection *sec)
>  {
> -  struct bfd_link_hash_entry *h;
> +  struct elf_link_hash_entry *h;
>
> -  h = bfd_generic_define_start_stop (info, symbol, sec);
> -  if (h != NULL)
> +  h = elf_link_hash_lookup (elf_hash_table (info), symbol,
> +                           FALSE, FALSE, TRUE);
> +  if (h != NULL
> +      && (h->root.type == bfd_link_hash_undefined
> +         || h->root.type == bfd_link_hash_undefweak
> +         || (h->ref_regular && !h->def_regular)))
>      {
> -      struct elf_link_hash_entry *eh = (struct elf_link_hash_entry *) h;
> -      eh->start_stop = 1;
> -      eh->u2.start_stop_section = sec;
> -      _bfd_elf_link_hash_hide_symbol (info, eh, TRUE);
> -      if (ELF_ST_VISIBILITY (eh->other) != STV_INTERNAL)
> -       eh->other = ((eh->other & ~ELF_ST_VISIBILITY (-1))
> -                    | STV_HIDDEN);
> +      h->root.type = bfd_link_hash_defined;
> +      h->root.u.def.section = sec;
> +      h->root.u.def.value = 0;
> +      h->def_regular = 1;
> +      h->def_dynamic = 0;
> +      h->start_stop = 1;
> +      h->u2.start_stop_section = sec;
> +      if (symbol[0] == '.')
> +       {
> +         /* .startof. and .sizeof. symbols are local.  */
> +         _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
> +       }
> +      else if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
> +       h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED;
> +      return &h->root;
>      }
> -  return h;
> +  return NULL;
>  }
> diff --git a/ld/ChangeLog b/ld/ChangeLog
> index a150256..5e2ddf4 100644
> --- a/ld/ChangeLog
> +++ b/ld/ChangeLog
> @@ -1,3 +1,33 @@
> +2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
> +           Alan Modra  <amodra@gmail.com>
> +
> +       PR ld/21964
> +       * testsuite/ld-elf/pr21562a.d: Update for changed start/stop symbols.
> +       * testsuite/ld-elf/pr21562b.d: Likewise.
> +       * testsuite/ld-elf/pr21562c.d: Likewise.
> +       * testsuite/ld-elf/pr21562d.d: Likewise.
> +       * testsuite/ld-elf/pr21562e.d: Likewise.
> +       * testsuite/ld-elf/pr21562f.d: Likewise.
> +       * testsuite/ld-elf/pr21562g.d: Likewise.
> +       * testsuite/ld-elf/pr21562h.d: Likewise.
> +       * testsuite/ld-elf/pr21562i.d: Likewise.
> +       * testsuite/ld-elf/pr21562j.d: Likewise.
> +       * testsuite/ld-elf/pr21562k.d: Likewise.
> +       * testsuite/ld-elf/pr21562l.d: Likewise.
> +       * testsuite/ld-elf/pr21562m.d: Likewise.
> +       * testsuite/ld-elf/pr21562n.d: Likewise.
> +       * testsuite/ld-elf/sizeofa.d: Likewise.
> +       * testsuite/ld-elf/sizeofb.d: Likewise.
> +       * testsuite/ld-elf/startofa.d: Likewise.
> +       * testsuite/ld-elf/startofb.d: Likewise.
> +       * testsuite/ld-gc/pr20022.d: Likewise.
> +       * testsuite/ld-gc/start.d: Likewise.
> +       * testsuite/ld-elf/pr21964-1a.c: New file.
> +       * testsuite/ld-elf/pr21964-1b.c: New file.
> +       * testsuite/ld-elf/pr21964-2a.c: New file.
> +       * testsuite/ld-elf/pr21964-2b.c: New file.
> +       * testsuite/ld-elf/shared.exp: Run PR ld/21964 tests.
> +
>  2017-08-21  Hans-Peter Nilsson  <hp@bitrange.com>
>
>         PR ld/20125
> diff --git a/ld/testsuite/ld-elf/pr21562a.d b/ld/testsuite/ld-elf/pr21562a.d
> index ecf013f..e978734 100644
> --- a/ld/testsuite/ld-elf/pr21562a.d
> +++ b/ld/testsuite/ld-elf/pr21562a.d
> @@ -8,5 +8,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562b.d b/ld/testsuite/ld-elf/pr21562b.d
> index 063a141..f1d058a 100644
> --- a/ld/testsuite/ld-elf/pr21562b.d
> +++ b/ld/testsuite/ld-elf/pr21562b.d
> @@ -8,5 +8,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562c.d b/ld/testsuite/ld-elf/pr21562c.d
> index 1d72a0d..1bfbff3 100644
> --- a/ld/testsuite/ld-elf/pr21562c.d
> +++ b/ld/testsuite/ld-elf/pr21562c.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562d.d b/ld/testsuite/ld-elf/pr21562d.d
> index f752a24..4f8e91e 100644
> --- a/ld/testsuite/ld-elf/pr21562d.d
> +++ b/ld/testsuite/ld-elf/pr21562d.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562e.d b/ld/testsuite/ld-elf/pr21562e.d
> index 769f2f8..ee969bd 100644
> --- a/ld/testsuite/ld-elf/pr21562e.d
> +++ b/ld/testsuite/ld-elf/pr21562e.d
> @@ -6,5 +6,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562f.d b/ld/testsuite/ld-elf/pr21562f.d
> index cb81c2a..119f43e 100644
> --- a/ld/testsuite/ld-elf/pr21562f.d
> +++ b/ld/testsuite/ld-elf/pr21562f.d
> @@ -6,5 +6,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562g.d b/ld/testsuite/ld-elf/pr21562g.d
> index 9926416..f3d2a31 100644
> --- a/ld/testsuite/ld-elf/pr21562g.d
> +++ b/ld/testsuite/ld-elf/pr21562g.d
> @@ -6,5 +6,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562h.d b/ld/testsuite/ld-elf/pr21562h.d
> index 1e723ba..0517aec 100644
> --- a/ld/testsuite/ld-elf/pr21562h.d
> +++ b/ld/testsuite/ld-elf/pr21562h.d
> @@ -6,5 +6,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562i.d b/ld/testsuite/ld-elf/pr21562i.d
> index f5b59c5..8baa583 100644
> --- a/ld/testsuite/ld-elf/pr21562i.d
> +++ b/ld/testsuite/ld-elf/pr21562i.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562j.d b/ld/testsuite/ld-elf/pr21562j.d
> index 70e311e..99d987c 100644
> --- a/ld/testsuite/ld-elf/pr21562j.d
> +++ b/ld/testsuite/ld-elf/pr21562j.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562k.d b/ld/testsuite/ld-elf/pr21562k.d
> index 4c62eb7..6aa8334 100644
> --- a/ld/testsuite/ld-elf/pr21562k.d
> +++ b/ld/testsuite/ld-elf/pr21562k.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562l.d b/ld/testsuite/ld-elf/pr21562l.d
> index b0ba90d..82bab1e 100644
> --- a/ld/testsuite/ld-elf/pr21562l.d
> +++ b/ld/testsuite/ld-elf/pr21562l.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562m.d b/ld/testsuite/ld-elf/pr21562m.d
> index fbcf76f..e1ad876 100644
> --- a/ld/testsuite/ld-elf/pr21562m.d
> +++ b/ld/testsuite/ld-elf/pr21562m.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21562n.d b/ld/testsuite/ld-elf/pr21562n.d
> index 2453169..583c771 100644
> --- a/ld/testsuite/ld-elf/pr21562n.d
> +++ b/ld/testsuite/ld-elf/pr21562n.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/pr21964-1a.c b/ld/testsuite/ld-elf/pr21964-1a.c
> new file mode 100644
> index 0000000..f2eae53
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/pr21964-1a.c
> @@ -0,0 +1,11 @@
> +extern int __start___verbose[];
> +extern int __stop___verbose[];
> +int foo (void)
> +{
> +  static int my_var __attribute__((used, section("__verbose"))) = 5;
> +  if (__start___verbose == __stop___verbose
> +      || __start___verbose[0] != 5)
> +    return -1;
> +  else
> +    return 0;
> +}
> diff --git a/ld/testsuite/ld-elf/pr21964-1b.c b/ld/testsuite/ld-elf/pr21964-1b.c
> new file mode 100644
> index 0000000..440c937
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/pr21964-1b.c
> @@ -0,0 +1,24 @@
> +#include <stdio.h>
> +
> +extern int foo (void);
> +
> +extern int __start___verbose[];
> +extern int __stop___verbose[];
> +static int my_var __attribute__((used, section("__verbose"))) = 6;
> +int bar (void)
> +{
> +  if (__start___verbose == __stop___verbose)
> +    return -1;
> +
> +  if (__start___verbose[0] != 6)
> +    return -2;
> +  else
> +    return 0;
> +}
> +
> +int main()
> +{
> +  if (bar () == 0 && foo () == 0)
> +    printf ("PASS\n");
> +  return 0;
> +}
> diff --git a/ld/testsuite/ld-elf/pr21964-2a.c b/ld/testsuite/ld-elf/pr21964-2a.c
> new file mode 100644
> index 0000000..617ce75
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/pr21964-2a.c
> @@ -0,0 +1,11 @@
> +extern int __start___verbose[];
> +extern int __stop___verbose[];
> +int foo (void)
> +{
> +  static int my_var __attribute__((used, section("__verbose"))) = 5;
> +  if (__start___verbose == __stop___verbose
> +      && __start___verbose[0] != 5)
> +    return -1;
> +  else
> +    return 0;
> +}
> diff --git a/ld/testsuite/ld-elf/pr21964-2b.c b/ld/testsuite/ld-elf/pr21964-2b.c
> new file mode 100644
> index 0000000..5f638a3
> --- /dev/null
> +++ b/ld/testsuite/ld-elf/pr21964-2b.c
> @@ -0,0 +1,27 @@
> +#include <dlfcn.h>
> +#include <stdio.h>
> +
> +int main()
> +{
> +  void *dl;
> +  void *sym;
> +  int (*func) (void);
> +
> +  dl = dlopen("pr21964-2.so", RTLD_LAZY);
> +  if (!dl)
> +    return 1;
> +
> +  sym = dlsym(dl, "__start___verbose");
> +  if (!sym)
> +    return 2;
> +
> +  func = dlsym(dl, "foo");
> +  if (!func)
> +    return 3;
> +  if (func () == 0)
> +    printf ("PASS\n");
> +
> +  dlclose(dl);
> +
> +  return 0;
> +}
> diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
> index 8b139ec..0802fa2 100644
> --- a/ld/testsuite/ld-elf/shared.exp
> +++ b/ld/testsuite/ld-elf/shared.exp
> @@ -423,6 +423,12 @@ set build_tests {
>    {"Build libpr19073.so"
>     "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC"
>     {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"}
> +  {"Build pr21964-1.so"
> +   "-shared" "-fPIC"
> +   {pr21964-1a.c} {} "pr21964-1.so"}
> +  {"Build pr21964-2.so"
> +   "-shared" "-fPIC"
> +   {pr21964-2a.c} {} "pr21964-2.so"}
>  }
>
>  run_cc_link_tests $build_tests
> @@ -540,6 +546,9 @@ set run_tests [list \
>      [list "Run pr18458" \
>       "-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \
>       {pr18458c.c} "pr18458" "pass.out" ] \
> +    [list "Run pr21964-1" \
> +     "-Wl,--no-as-needed,-rpath,tmpdir tmpdir/pr21964-1.so" "" \
> +     {pr21964-1b.c} "pr21964-1" "pass.out" ] \
>  ]
>
>  # NetBSD ELF systems do not currently support the .*_array sections.
> @@ -586,6 +595,9 @@ set dlopen_run_tests [list \
>      [list "Run dl6d1 with --dynamic-list-data and dlopen on libdl6d.so" \
>       "-Wl,--no-as-needed,--dynamic-list-data $extralibs" "" \
>       {dl6dmain.c} "dl6d1" "dl6b.out" ] \
> +    [list "Run pr21964-2" \
> +     "-Wl,--no-as-needed,-rpath,tmpdir $extralibs" "" \
> +     {pr21964-2b.c} "pr21964-2" "pass.out" ] \
>  ]
>
>  # Only run them when libdl is available.
> diff --git a/ld/testsuite/ld-elf/sizeofa.d b/ld/testsuite/ld-elf/sizeofa.d
> index 572ffbd..3eaa4e5 100644
> --- a/ld/testsuite/ld-elf/sizeofa.d
> +++ b/ld/testsuite/ld-elf/sizeofa.d
> @@ -6,7 +6,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
>   +Num: +Value +Size Type +Bind +Vis +Ndx Name
>   +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
>  #...
> - +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +(LOC|GLOB)AL +DEFAULT +[0-9]+ +___?stop_scnfoo
> + +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +(PROTECTED|DEFAULT) +[0-9]+ +___?stop_scnfoo
>  #...
>   +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +UND +.sizeof.scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d
> index ac4a6a4..c7d4edd 100644
> --- a/ld/testsuite/ld-elf/sizeofb.d
> +++ b/ld/testsuite/ld-elf/sizeofb.d
> @@ -7,7 +7,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
>   +Num: +Value +Size Type +Bind +Vis +Ndx Name
>   +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
>  #...
> - +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
> -#...
> - +[0-9]+: 0+10 + +0 +NOTYPE +LOCAL +DEFAULT +ABS +.sizeof.scnfoo
> + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?stop_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/startofa.d b/ld/testsuite/ld-elf/startofa.d
> index 07d5dda..6a4460f 100644
> --- a/ld/testsuite/ld-elf/startofa.d
> +++ b/ld/testsuite/ld-elf/startofa.d
> @@ -6,7 +6,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
>   +Num: +Value +Size Type +Bind +Vis +Ndx Name
>   +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
>  #...
> - +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +(LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo|GLOBAL +DEFAULT +UND +.startof.scnfoo)
> + +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +UND +.startof.scnfoo
>  #...
> - +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +DEFAULT +(UND +.startof.scnfoo|[0-9]+ +___?start_scnfoo)
> + +[0-9]+: +[a-f0-9]+ +0 +(NOTYPE|OBJECT) +GLOBAL +(PROTECTED|DEFAULT) +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d
> index 5d659bb..b0cf563 100644
> --- a/ld/testsuite/ld-elf/startofb.d
> +++ b/ld/testsuite/ld-elf/startofb.d
> @@ -7,7 +7,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
>   +Num: +Value +Size Type +Bind +Vis +Ndx Name
>   +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
>  #...
> - +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +.startof.scnfoo
> -#...
> - +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
> + +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +___?start_scnfoo
>  #pass
> diff --git a/ld/testsuite/ld-gc/pr20022.d b/ld/testsuite/ld-gc/pr20022.d
> index 906f73d..40473c2 100644
> --- a/ld/testsuite/ld-gc/pr20022.d
> +++ b/ld/testsuite/ld-gc/pr20022.d
> @@ -9,5 +9,5 @@
>  #...
>    \[[ 0-9]+\] _foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+[ \t]+.*
>  #...
> - +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start__foo
> + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +GLOBAL +PROTECTED +[0-9]+ +__start__foo
>  #pass
> diff --git a/ld/testsuite/ld-gc/start.d b/ld/testsuite/ld-gc/start.d
> index 9113b48..18e74c1 100644
> --- a/ld/testsuite/ld-gc/start.d
> +++ b/ld/testsuite/ld-gc/start.d
> @@ -5,5 +5,5 @@
>  #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
>
>  #...
> -[0-9a-f]+ d +__start__foo
> +[0-9a-f]+ D +__start__foo
>  #...
>
> --
> Alan Modra
> Australia Development Lab, IBM



-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]