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.
This commit is contained in:
Nick Clifton
2017-08-11 16:36:28 +01:00
parent 9593aade74
commit 93ab9c0de7
7 changed files with 36 additions and 0 deletions

View File

@@ -1828,6 +1828,8 @@ elf_static_list_options (FILE *file)
-z execstack Mark executable as requiring executable stack\n"));
fprintf (file, _("\
-z noexecstack Mark executable as not requiring executable stack\n"));
fprintf (file, _("\
-z globalaudit Mark executable requiring global auditing\n"));
}
static void