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