From 93ab9c0de7ba4a477720622c7e772d76f646e3f5 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 11 Aug 2017 16:36:28 +0100 Subject: Add -z globalaudit linker command line option to set the DF_GLOBALAUDIT flag bit in the dynamic tags. * emultempl/elf32.em (handle_option): Accept the -z globalaudit command line option. * lexsup.c (elf_static_list_options): Add -z globalaudit. * ld.texinfo: Document the support for the new command line option. * NEWS: Mention the new feature. * testsuite/ld-elf/audit.exp: Add a test of the -z globalaudit command line option. * testsuite/ld-elf/globalaudit.rd: New file: Expected output from readelf. --- ld/testsuite/ld-elf/audit.exp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ld/testsuite/ld-elf/audit.exp') diff --git a/ld/testsuite/ld-elf/audit.exp b/ld/testsuite/ld-elf/audit.exp index 83ee355..b7af4b7 100644 --- a/ld/testsuite/ld-elf/audit.exp +++ b/ld/testsuite/ld-elf/audit.exp @@ -60,6 +60,9 @@ set build_tests { {"Run with -lusesaudit -lusesaudit2" "-Ltmpdir/ -lusesaudit -lusesaudit2" "" {main.c} {{"readelf" {-d} "depaudit2.rd"}} "useslibusesaudit2.out"} + {"Link with -z globalaudit" + "-Wl,-Paudit.so -Wl,-z,globalaudit" "" + {main.c} {{"readelf" {-d} "globalaudit.rd"}} "globalaudit.out"} } run_cc_link_tests $build_tests -- cgit v1.1