What's the meaning for "-z" ld command line option

18 Views Asked by At

The ld doc shows that some of the options are prefixed with -z:

-z keyword
  The recognized keywords are:

  ‘call-nop=prefix-addr’
  ‘call-nop=suffix-nop’
  ‘call-nop=prefix-byte’
  ‘call-nop=suffix-byte’

But why these options are so special that need to prefixed -z? Are there special meanings for -z? The closest explanation is that those options are ELF specific. I found this in the Aarch64 commit:

This patch moves the current AArch64 ld options of --force-bti and --pac-plt to -z force-bti and -z pac-plt since these are ELF specific options.

But I wonder if there any "formal" documentation about it?

0

There are 0 best solutions below