From: Nick Clifton Date: Fri, 11 Aug 2017 15:36:28 +0000 (+0100) Subject: Add -z globalaudit linker command line option to set the DF_GLOBALAUDIT flag bit... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93ab9c0de7ba4a477720622c7e772d76f646e3f5;p=binutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 484c36cb041..fe06729df06 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2017-08-11 Nick Clifton + + * 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. + 2017-08-11 H.J. Lu PR ld/21884 diff --git a/ld/NEWS b/ld/NEWS index 13932657dc6..bb5a62bd930 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,4 +1,7 @@ -*- text -*- +* Add -z globalaudit command line option to force audit libraries to be run + for every dynamic object loaded by an executable - provided that the loader + supports this functionality. * Tighten linker script grammar around file name specifiers to prevent the use of SORT_BY_ALIGNMENT and SORT_BY_INIT_PRIORITY on filenames. These would diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 9ac18403169..748f56b844f 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -2676,6 +2676,10 @@ fragment <