Date: Fri, 15 Feb 2002 12:48:16 -0500 From: "Alexander N. Kabaev" <ak03@gte.com> To: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>, current@FreeBSD.ORG Cc: freebsd-gnats-submit@FreeBSD.ORG, vova@sw.ru, "David O'Brien" <obrien@FreeBSD.ORG> Subject: Re: ports/34908: libpng port makes bad dynamic library on -CURRENT Message-ID: <3C6D49E0.3000506@gte.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> 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.
[-- Attachment #2 --]
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);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C6D49E0.3000506>
