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