public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Kevin F. Quinn" <kevquinn@gentoo.org>
To: binutils@sourceware.org
Subject: Re: Adding -z nonow to complement -z now
Date: Wed, 14 Jun 2006 00:41:00 -0000	[thread overview]
Message-ID: <20060613225428.705abf40@c1358217.kevquinn.com> (raw)
In-Reply-To: <448EF489.3090505@redhat.com>


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

On Tue, 13 Jun 2006 10:23:21 -0700
Ulrich Drepper <drepper@redhat.com> wrote:

> Alan Modra wrote:
> > On Mon, Jun 12, 2006 at 08:00:03PM +0200, Kevin F. Quinn wrote:
> >> Attached is a little patch that adds '-z nonow' as the opposite of
> >> '-z now'.  Could it be considered for inclusion, please?
> > 
> > You need to provide a proper changelog entry, and describe the
> > option in [...]
> 
> You cannot honestly consider allowing a patch introducing -z nonow.
> What is the opposite to 'now' in ELF terms?  It's not 'nonow', it's
> 'lazy'.

Ok; attached is an updated patch, hopefully I've addressed issues as
required so far.  Anything more, please say.

Thanks,
-- 
Kevin F. Quinn

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

2006-06-13	Kevin F. Quinn	<kevquinn@gentoo.org>

ld/

	* ld.texinfo: document new -z lazy option, inverse of -z now

ld/emultempl/

	* elf32.em (gld${EMULATION_NAME}_list_options): update help text
	(gld${EMULATION_NAME}_handle_option): handle new option

Index: ld/ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.163
diff -u -r1.163 ld.texinfo
--- ld/ld.texinfo	30 May 2006 16:45:31 -0000	1.163
+++ ld/ld.texinfo	13 Jun 2006 18:25:10 -0000
@@ -962,6 +962,12 @@
 Marks the object that its symbol table interposes before all symbols
 but the primary executable.
 
+@item lazy
+When generating an executable or shared library, mark it to tell the
+dynamic linker to defer function call resolution to the point when
+the function is called (lazy binding), rather than at load time.
+Lazy binding is the default.
+
 @item loadfltr
 Marks  the object that its filters be processed immediately at
 runtime.
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.166
diff -u -r1.166 elf32.em
--- ld/emultempl/elf32.em	3 Jun 2006 02:45:26 -0000	1.166
+++ ld/emultempl/elf32.em	13 Jun 2006 18:25:11 -0000
@@ -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, "lazy") == 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;
@@ -1909,6 +1914,7 @@
   fprintf (file, _("  -z execstack\t\tMark executable as requiring executable stack\n"));
   fprintf (file, _("  -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
   fprintf (file, _("  -z interpose\t\tMark object to interpose all DSOs but executable\n"));
+  fprintf (file, _("  -z lazy\t\tMark object lazy runtime binding (default)\n"));
   fprintf (file, _("  -z loadfltr\t\tMark object requiring immediate process\n"));
   fprintf (file, _("  -z muldefs\t\tAllow multiple definitions\n"));
   fprintf (file, _("  -z nocombreloc\tDon't merge dynamic relocs into one section\n"));

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  parent reply	other threads:[~2006-06-13 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 18:49 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 [this message]
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=20060613225428.705abf40@c1358217.kevquinn.com \
    --to=kevquinn@gentoo.org \
    --cc=binutils@sourceware.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).