This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi. Attached is a little patch that adds '-z nonow' as the opposite of '-z now'. Could it be considered for inclusion, please? Although some might consider it pointless, it would be very useful to us (Gentoo Hardened project). We flip the default when building with gcc to set -z now by default. Our current method of undoing this (which we need to do very occasionally) is via an extra option handled in a gcc specs file; the downside here is that libtool in particular filters our option because it doesn't recognise it. With this, we can pass '-Wl,-z,nonow' in LDFLAGS and libtool pays attention. If there's anything further I need to do to make this acceptable, please let me know. Thanks -- Kevin F. Quinn
Trivial patch to add "-z nonow" as an inverse to "-z now" --- ld/emultempl/elf32.em.orig 2006-06-03 04:45:26.000000000 +0200 +++ ld/emultempl/elf32.em 2006-06-12 19:51:13.000000000 +0200 @@ -1826,6 +1826,11 @@ link_info.flags |= (bfd_vma) DF_BIND_NOW; link_info.flags_1 |= (bfd_vma) DF_1_NOW; } + else if (strcmp (optarg, "nonow") == 0) + { + link_info.flags &= ~((bfd_vma) DF_BIND_NOW); + link_info.flags_1 &= ~((bfd_vma) DF_1_NOW); + } else if (strcmp (optarg, "origin") == 0) { link_info.flags |= (bfd_vma) DF_ORIGIN;
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |