From f68c9d09a395ad4bb48661401475ba7f8e8b8a2b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 5 Jan 2024 13:16:29 -0800 Subject: ld: Add --enable-mark-plt configure option Add --enable-mark-plt linker configure option to mark PLT entries with DT_X86_64_PLT, DT_X86_64_PLTSZ and DT_X86_64_PLTENT dynamic tags by default. * NEWS: Mention -z mark-plt/-z nomark-plt and --enable-mark-plt. * config.in: Regenerated. * configure: Likewise. * configure.ac: Add --enable-mark-plt. (DEFAULT_LD_Z_MARK_PLT): New AC_DEFINE_UNQUOTED. * emulparams/x86-64-plt.sh (PARSE_AND_LIST_OPTIONS_X86_64_PLT): Support DEFAULT_LD_Z_MARK_PLT. * emultempl/elf-x86.em (elf_x86_64_before_parse): New function. (LDEMUL_BEFORE_PARSE): New. Set to elf_x86_64_before_parse for x86-64 targets. --- ld/config.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ld/config.in') diff --git a/ld/config.in b/ld/config.in index 86d90d5..52d62f0 100644 --- a/ld/config.in +++ b/ld/config.in @@ -45,6 +45,10 @@ default. */ #undef DEFAULT_LD_WARN_RWX_SEGMENTS +/* Define to 1 if you want to enable -z mark-plt in ELF x86-64 linker by + default. */ +#undef DEFAULT_LD_Z_MARK_PLT + /* Define to 1 if you want to enable -z relro in ELF linker by default. */ #undef DEFAULT_LD_Z_RELRO -- cgit v1.1