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