public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Adding -z nonow to complement -z now
@ 2006-06-12 18:49 Kevin F. Quinn
  2006-06-12 18:54 ` Olivier Galibert
  2006-06-13  1:59 ` Alan Modra
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin F. Quinn @ 2006-06-12 18:49 UTC (permalink / raw)
  To: binutils; +Cc: toolchain


[-- Attachment #1.1: Type: text/plain, Size: 739 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: binutils-060612-znonow.patch --]
[-- Type: text/x-patch; name=binutils-060612-znonow.patch, Size: 571 bytes --]

	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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-06-14  2:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-12 18:49 Adding -z nonow to complement -z now Kevin F. Quinn
2006-06-12 18:54 ` Olivier Galibert
2006-06-12 19:56   ` Kevin F. Quinn
2006-06-13  1:59 ` Alan Modra
2006-06-13 17:27   ` Ulrich Drepper
2006-06-13 18:10     ` Kevin F. Quinn
2006-06-14  0:41     ` Kevin F. Quinn
2006-06-14  6:07       ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).