From owner-freebsd-current Fri Feb 15 9:48:57 2002 Delivered-To: freebsd-current@freebsd.org Received: from h132-197-179-51.gte.com (h132-197-179-51.gte.com [132.197.179.51]) by hub.freebsd.org (Postfix) with ESMTP id 9686037B400; Fri, 15 Feb 2002 09:48:53 -0800 (PST) Received: from gte.com (localhost [127.0.0.1]) by h132-197-179-51.gte.com (8.11.6/8.11.4) with ESMTP id g1FHmGh79412; Fri, 15 Feb 2002 12:48:16 -0500 (EST) (envelope-from ak03@gte.com) Message-ID: <3C6D49E0.3000506@gte.com> Date: Fri, 15 Feb 2002 12:48:16 -0500 From: "Alexander N. Kabaev" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.8) Gecko/20020205 X-Accept-Language: ru, cs, be, en-us MIME-Version: 1.0 To: Bjoern Fischer , current@FreeBSD.ORG Cc: freebsd-gnats-submit@FreeBSD.ORG, vova@sw.ru, "David O'Brien" Subject: Re: ports/34908: libpng port makes bad dynamic library on -CURRENT Content-Type: multipart/mixed; boundary="------------020506050203060708010605" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------020506050203060708010605 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit > Interesting. Is the DF_TEXTREL flag set in DT_FLAGS instead? Is the > library linked w/ -enable-new-dtags? Are the new dtags enabled by > default in the new binutils? Someting in elf32.em? No. DT_FLAGS entry is not created regardless of whether the --enable-new-dtags parameter has been passed to the linker. Ld simply ignores dynamic relocation entries for local symbols while checking whether either DT_FLAGS or DT_TEXTREL should be created. Attached patch appears to fix the problem for me and has not caused any problems on my test box so far but I am not making any claims about its correctness. Use on your own risk. > Are the new dtags enabled by default in the new binutils? No, it seems like the new dtags are disabled by default. --------------020506050203060708010605 Content-Type: text/plain; name="binutils.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="binutils.diff" Index: bfd/elf32-i386.c =================================================================== RCS file: /usr/ncvs/src/contrib/binutils/bfd/elf32-i386.c,v retrieving revision 1.11 diff -u -r1.11 elf32-i386.c --- bfd/elf32-i386.c 27 Jan 2002 12:07:38 -0000 1.11 +++ bfd/elf32-i386.c 15 Feb 2002 17:21:54 -0000 @@ -1506,6 +1506,10 @@ } else { + asection *s = p->sec->output_section; + if (s != NULL && (s->flags & SEC_READONLY) != 0) + info->flags |= DF_TEXTREL; + srel = elf_section_data (p->sec)->sreloc; srel->_raw_size += p->count * sizeof (Elf32_External_Rel); } --------------020506050203060708010605-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message