Blame sysdeps/x86/tst-cet-legacy-mod-5c.c

Packit Service d72518
/* Check compatibility of CET-enabled executable with dlopened legacy
Packit Service d72518
   shared object.
Packit Service d72518
   Copyright (C) 2019 Free Software Foundation, Inc.
Packit Service d72518
   This file is part of the GNU C Library.
Packit Service d72518
Packit Service d72518
   The GNU C Library is free software; you can redistribute it and/or
Packit Service d72518
   modify it under the terms of the GNU Lesser General Public
Packit Service d72518
   License as published by the Free Software Foundation; either
Packit Service d72518
   version 2.1 of the License, or (at your option) any later version.
Packit Service d72518
Packit Service d72518
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service d72518
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service d72518
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service d72518
   Lesser General Public License for more details.
Packit Service d72518
Packit Service d72518
   You should have received a copy of the GNU Lesser General Public
Packit Service d72518
   License along with the GNU C Library; if not, see
Packit Service d72518
   <http://www.gnu.org/licenses/>.  */
Packit Service d72518
Packit Service d72518
#include <stdlib.h>
Packit Service d72518
Packit Service d72518
static int called = 0;
Packit Service d72518
Packit Service d72518
static void
Packit Service d72518
__attribute__ ((constructor))
Packit Service d72518
init (void)
Packit Service d72518
{
Packit Service d72518
  called = 1;
Packit Service d72518
}
Packit Service d72518
Packit Service d72518
void
Packit Service d72518
foo (void)
Packit Service d72518
{
Packit Service d72518
  if (!called)
Packit Service d72518
    abort ();
Packit Service d72518
}