|
Packit Service |
59535c |
/* Check that a moved versioned symbol can be found using dlsym, dlvsym.
|
|
Packit Service |
59535c |
Copyright (C) 2019 Free Software Foundation, Inc.
|
|
Packit Service |
59535c |
This file is part of the GNU C Library.
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
59535c |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
59535c |
License as published by the Free Software Foundation; either
|
|
Packit Service |
59535c |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
59535c |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
59535c |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
59535c |
Lesser General Public License for more details.
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
59535c |
License along with the GNU C Library; if not, see
|
|
Packit Service |
59535c |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
#include <stddef.h>
|
|
Packit Service |
59535c |
#include <support/check.h>
|
|
Packit Service |
59535c |
#include <support/xdlfcn.h>
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
static int
|
|
Packit Service |
59535c |
do_test (void)
|
|
Packit Service |
59535c |
{
|
|
Packit Service |
59535c |
/* tst-sonamemove-runmod1.so does not define moved_function, but it
|
|
Packit Service |
59535c |
depends on tst-sonamemove-runmod2.so, which does. */
|
|
Packit Service |
59535c |
void *handle = xdlopen ("tst-sonamemove-runmod1.so", RTLD_NOW);
|
|
Packit Service |
59535c |
TEST_VERIFY (xdlsym (handle, "moved_function") != NULL);
|
|
Packit Service |
59535c |
TEST_VERIFY (xdlvsym (handle, "moved_function", "SONAME_MOVE") != NULL);
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
return 0;
|
|
Packit Service |
59535c |
}
|
|
Packit Service |
59535c |
|
|
Packit Service |
59535c |
#include <support/test-driver.c>
|