Blame elf/tst-dlopen-nodelete-reloc-mod15.cc
|
Packit Service |
08e0c7 |
/* Helper object to mark tst-dlopen-nodelete-reloc-mod14.so as NODELETE.
|
|
Packit Service |
08e0c7 |
Copyright (C) 2019 Free Software Foundation, Inc.
|
|
Packit Service |
08e0c7 |
This file is part of the GNU C Library.
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
08e0c7 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
08e0c7 |
License as published by the Free Software Foundation; either
|
|
Packit Service |
08e0c7 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
08e0c7 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
08e0c7 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
08e0c7 |
Lesser General Public License for more details.
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
08e0c7 |
License along with the GNU C Library; if not, see
|
|
Packit Service |
08e0c7 |
<https://www.gnu.org/licenses/>. */
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
#include "tst-dlopen-nodelete-reloc.h"
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
#include <stdbool.h>
|
|
Packit Service |
08e0c7 |
#include <stdio.h>
|
|
Packit Service |
08e0c7 |
#include <unistd.h>
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
extern template struct unique_symbol<14>;
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
/* Trigger the creation of a unique symbol reference. This should
|
|
Packit Service |
08e0c7 |
cause tst-dlopen-nodelete-reloc-mod14.so to be marked as
|
|
Packit Service |
08e0c7 |
NODELETE. */
|
|
Packit Service |
08e0c7 |
int
|
|
Packit Service |
08e0c7 |
global_function_mod15 (void)
|
|
Packit Service |
08e0c7 |
{
|
|
Packit Service |
08e0c7 |
return unique_symbol<14>::value;
|
|
Packit Service |
08e0c7 |
}
|
|
Packit Service |
08e0c7 |
|
|
Packit Service |
08e0c7 |
static void __attribute__ ((destructor))
|
|
Packit Service |
08e0c7 |
fini (void)
|
|
Packit Service |
08e0c7 |
{
|
|
Packit Service |
08e0c7 |
/* This object is never loaded completely. */
|
|
Packit Service |
08e0c7 |
puts ("error: tst-dlopen-nodelete-reloc-mod15.so destructor invoked");
|
|
Packit Service |
08e0c7 |
_exit (1);
|
|
Packit Service |
08e0c7 |
}
|