public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Kevin F. Quinn" <kevquinn@gentoo.org>
To: binutils@sourceware.org
Cc: toolchain@gentoo.org
Subject: Adding -z nonow to complement -z now
Date: Mon, 12 Jun 2006 18:49:00 -0000	[thread overview]
Message-ID: <20060612200003.1cc84ee3@c1358217.kevquinn.com> (raw)


[-- 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 --]

             reply	other threads:[~2006-06-12 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 18:49 Kevin F. Quinn [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060612200003.1cc84ee3@c1358217.kevquinn.com \
    --to=kevquinn@gentoo.org \
    --cc=binutils@sourceware.org \
    --cc=toolchain@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).