From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21074 invoked by alias); 13 Jun 2006 20:45:21 -0000 Received: (qmail 21055 invoked by uid 22791); 13 Jun 2006 20:45:20 -0000 X-Spam-Check-By: sourceware.org Received: from mail-relay-2.tiscali.it (HELO mail-relay-2.tiscali.it) (213.205.33.42) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 Jun 2006 20:45:19 +0000 Received: from c1358217.kevquinn.com (84.222.85.17) by mail-relay-2.tiscali.it (7.3.104) id 4489432C0007DCFC for binutils@sourceware.org; Tue, 13 Jun 2006 22:45:15 +0200 Date: Wed, 14 Jun 2006 00:41:00 -0000 From: "Kevin F. Quinn" To: binutils@sourceware.org Subject: Re: Adding -z nonow to complement -z now Message-ID: <20060613225428.705abf40@c1358217.kevquinn.com> In-Reply-To: <448EF489.3090505@redhat.com> References: <20060612200003.1cc84ee3@c1358217.kevquinn.com> <20060613011136.GH32562@bubble.grove.modra.org> <448EF489.3090505@redhat.com> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.12; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_PA8pd9UYkm+wS5cCdeDr8HB; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00219.txt.bz2 --Sig_PA8pd9UYkm+wS5cCdeDr8HB Content-Type: multipart/mixed; boundary=MP_nveFM+u.HpjvI0wc68DP5Um --MP_nveFM+u.HpjvI0wc68DP5Um Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 695 On Tue, 13 Jun 2006 10:23:21 -0700 Ulrich Drepper 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? > >=20 > > You need to provide a proper changelog entry, and describe the > > option in [...] >=20 > 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, --=20 Kevin F. Quinn --MP_nveFM+u.HpjvI0wc68DP5Um Content-Type: text/x-patch; name=binutils-060613-zlazy.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=binutils-060613-zlazy.patch Content-length: 2594 2006-06-13 Kevin F. Quinn 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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. =20 +@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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 |=3D (bfd_vma) DF_BIND_NOW; link_info.flags_1 |=3D (bfd_vma) DF_1_NOW; } + else if (strcmp (optarg, "lazy") =3D=3D 0) + { + link_info.flags &=3D ~((bfd_vma) DF_BIND_NOW); + link_info.flags_1 &=3D ~((bfd_vma) DF_1_NOW); + } else if (strcmp (optarg, "origin") =3D=3D 0) { link_info.flags |=3D (bfd_vma) DF_ORIGIN; @@ -1909,6 +1914,7 @@ fprintf (file, _(" -z execstack\t\tMark executable as requiring executa= ble 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 bu= t executable\n")); + fprintf (file, _(" -z lazy\t\tMark object lazy runtime binding (default= )\n")); fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate proce= ss\n")); fprintf (file, _(" -z muldefs\t\tAllow multiple definitions\n")); fprintf (file, _(" -z nocombreloc\tDon't merge dynamic relocs into one = section\n")); --MP_nveFM+u.HpjvI0wc68DP5Um-- --Sig_PA8pd9UYkm+wS5cCdeDr8HB Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc Content-length: 191 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEjyYK9G2S8dekcG0RAuZzAJ90l81Yy/w9bgk6zWRGXthFUdZCWgCg2oPK xYLggB19McUuZMH2NdYfZLI= =LBd6 -----END PGP SIGNATURE----- --Sig_PA8pd9UYkm+wS5cCdeDr8HB--