Blame elf/tst-dlopen-nodelete-reloc.h

Packit Service 723c1e
/* Template to produce unique symbols.
Packit Service 723c1e
   Copyright (C) 2019 Free Software Foundation, Inc.
Packit Service 723c1e
   This file is part of the GNU C Library.
Packit Service 723c1e
Packit Service 723c1e
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 723c1e
   modify it under the terms of the GNU Lesser General Public
Packit Service 723c1e
   License as published by the Free Software Foundation; either
Packit Service 723c1e
   version 2.1 of the License, or (at your option) any later version.
Packit Service 723c1e
Packit Service 723c1e
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 723c1e
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 723c1e
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 723c1e
   Lesser General Public License for more details.
Packit Service 723c1e
Packit Service 723c1e
   You should have received a copy of the GNU Lesser General Public
Packit Service 723c1e
   License along with the GNU C Library; if not, see
Packit Service 723c1e
   <https://www.gnu.org/licenses/>.  */
Packit Service 723c1e
Packit Service 723c1e
/* This template produces a unique symbol definition for an explicit
Packit Service 723c1e
   template instantiation (without also incorporating a reference),
Packit Service 723c1e
   and an extern template declaration can be used to reference that
Packit Service 723c1e
   symbol from another object.  The modid parameter is just a
Packit Service 723c1e
   placeholder to create different symbols (because it affects the
Packit Service 723c1e
   name mangling of the static value member).  By convention, it
Packit Service 723c1e
   should match the number of the module that contains the
Packit Service 723c1e
   definition.  */
Packit Service 723c1e
Packit Service 723c1e
template <int modid>
Packit Service 723c1e
struct unique_symbol
Packit Service 723c1e
{
Packit Service 723c1e
  static int value;
Packit Service 723c1e
};
Packit Service 723c1e
Packit Service 723c1e
template <int modid>
Packit Service 723c1e
int unique_symbol<modid>::value;