From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13031 invoked by alias); 21 Feb 2004 15:44:05 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 13014 invoked from network); 21 Feb 2004 15:44:04 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sources.redhat.com with SMTP; 21 Feb 2004 15:44:04 -0000 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) by Cantor.suse.de (Postfix) with ESMTP id 6381E216FCF for ; Sat, 21 Feb 2004 16:44:04 +0100 (CET) Received: from aj by arthur.inka.de with local (Exim 4.22) id 1AuZIQ-0006J7-Fz for libc-hacker@sources.redhat.com; Sat, 21 Feb 2004 16:44:02 +0100 To: Glibc hackers Subject: Fix lvalue casts in elf/dl-load.c From: Andreas Jaeger Date: Sat, 21 Feb 2004 15:44:00 -0000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2004-02/txt/msg00044.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1310 The appended patch removes the with GCC 3.5 deprecated lvalue casts and generates the same assembler code (tested with GCC 3.3 hammer-branch on AMD64). Ok to commit? Andreas 2004-02-21 Andreas Jaeger * elf/dl-load.c (_dl_map_object_from_fd): Fix casts used as lvalue. =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 Index: elf/dl-load.c --- elf/dl-load.c 9 Feb 2004 07:03:48 -0000 1.235 +++ elf/dl-load.c 21 Feb 2004 15:42:44 -0000 @@ -1228,7 +1228,7 @@ cannot allocate TLS data structures for=20 } else /* Adjust the PT_PHDR value by the runtime load address. */ - (ElfW(Addr)) l->l_phdr +=3D l->l_addr; + l->l_phdr =3D (ElfW(Phdr) *) ((ElfW(Addr)) l->l_phdr + l->l_addr); } =20 #ifdef USE_TLS @@ -1254,7 +1254,7 @@ cannot allocate TLS data structures for=20 } } else - (ElfW(Addr)) l->l_ld +=3D l->l_addr; + l->l_ld =3D (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr); =20 l->l_entry +=3D l->l_addr; =20 --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQBAN3zCOJpWPMJyoSYRAhDvAJ4pta5OlnepFMnh0z3Gw0Sm7HsASwCfaUHC 8gjzrYsNK1R5F4IHDaU++lY= =6rV9 -----END PGP SIGNATURE----- --=-=-=--