Why does elf32.em check DT_BIND_NOW?

H.J. Lu hjl@lucon.org
Sun Sep 16 18:42:00 GMT 2007


Hi Jakub,

elf32.em sets the DF_BIND_NOW bit in link_info.flags for -z now.
But elf32.em checks the DT_BIND_NOW bit in link_info.flags. I don't
quite understand how it works. I have 2 questions:

1. Should elf32.em check the DF_BIND_NOW bit link_info.flags
instead?
2. Why do we need a different linker script for -z now?

As I understand, -z now should just add the DF_BIND_NOW entry
and no special linker script is needed.

I am planning to clean up the ELF linker scripts by

1. Remove the special linker script for -z now.
2. For PIE, DSO and executable, generate linker scripts for
any combinations of -z relro and -z combreloc.

Do you see any problems?

Thanks.


H.J.



More information about the Binutils mailing list