about summary refs log tree commit diff
path: root/elf/tst-audit17.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-30 00:21:18 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-07-30 16:01:44 -0300
commit3908fa933a4354309225af616d9242f595e11ccf (patch)
treec5762614dfb75db96afc0e614c8bfa8f1cd23070 /elf/tst-audit17.c
parentc37fc3ebf0607ce1953c565ffe56d56555eeb25e (diff)
downloadglibc-3908fa933a4354309225af616d9242f595e11ccf.tar.gz
glibc-3908fa933a4354309225af616d9242f595e11ccf.tar.xz
glibc-3908fa933a4354309225af616d9242f595e11ccf.zip
elf: Fix audit regression
Commit 03e187a41d9 added a regression when an audit module does not have
libc as DT_NEEDED (although unusual it is possible).

Checked on x86_64-linux-gnu.
Diffstat (limited to 'elf/tst-audit17.c')
-rw-r--r--elf/tst-audit17.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/elf/tst-audit17.c b/elf/tst-audit17.c
new file mode 100644
index 0000000000..92986699d4
--- /dev/null
+++ b/elf/tst-audit17.c
@@ -0,0 +1,25 @@
+/* Check DT_AUDIT with audit not linked against libc.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+static int
+do_test (void)
+{
+  return 0;
+}
+
+#include <support/test-driver.c>