hjl / source-git / glibc

Forked from source-git/glibc 3 years ago
Clone

Blame elf/tst-dlopenfailmod1.c

Packit 047a98
/* Module which depends on two modules: one NODELETE, one missing.
Packit 047a98
   Copyright (C) 2019 Free Software Foundation, Inc.
Packit 047a98
   This file is part of the GNU C Library.
Packit 047a98
Packit 047a98
   The GNU C Library is free software; you can redistribute it and/or
Packit 047a98
   modify it under the terms of the GNU Lesser General Public
Packit 047a98
   License as published by the Free Software Foundation; either
Packit 047a98
   version 2.1 of the License, or (at your option) any later version.
Packit 047a98
Packit 047a98
   The GNU C Library is distributed in the hope that it will be useful,
Packit 047a98
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 047a98
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 047a98
   Lesser General Public License for more details.
Packit 047a98
Packit 047a98
   You should have received a copy of the GNU Lesser General Public
Packit 047a98
   License along with the GNU C Library; if not, see
Packit 047a98
   <https://www.gnu.org/licenses/>.  */
Packit 047a98
Packit 047a98
/* Note: Due to the missing second module, this object cannot be
Packit 047a98
   loaded at run time.  */
Packit 047a98
Packit 047a98
#include <pthread.h>
Packit 047a98
#include <stdio.h>
Packit 047a98
#include <unistd.h>
Packit 047a98
Packit 047a98
/* Force linking against libpthread.  */
Packit 047a98
void *pthread_create_reference = pthread_create;
Packit 047a98
Packit 047a98
/* The constructor will never be executed because the module cannot be
Packit 047a98
   loaded.  */
Packit 047a98
static void __attribute__ ((constructor))
Packit 047a98
init (void)
Packit 047a98
{
Packit 047a98
  puts ("tst-dlopenfailmod1 constructor executed");
Packit 047a98
  _exit (1);
Packit 047a98
}