From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Youngdale" To: hjl@nynexst.com (H.J. Lu) Cc: gas2@cygnus.com, raeburn@cygnus.com (Ken Raeburn), ian@cygnus.com (Ian Lance Taylor), linux-gcc@vger.rutgers.edu (linuxgcc), bonn@eskimo.com (David Bonn), kjahds@kjahds.com (Kenneth Albanowski), lmfken@lmf.ericsson.se (Kenneth Osterberg), ian@lasermoon.co.uk, mat@ardi.com (Mat Hostetter), ecn@clark.net (Eric C. Newton), doughera@lafcol.lafayette.edu (Andy Dougherty), brian@mathworks.com (Brian Bourgault), jchristy@bga.com (John W. Christy), craig@metrolink.com (Craig Groeschel), imp@village.org (Warner Losh), robf@www.willows.com (Rob Farnum), Huw.Rogers@ska.com (Huw Rogers), meissner@cygnus.com (Michael Meissner) Subject: Re: DT_SYMBOLIC and -Bsymbolic Date: Mon, 19 Jun 1995 08:13:00 -0000 Message-id: <9506191109.ZM13867@aib.com> References: <9506191453.AA04291@titanic.nynexst.com> X-SW-Source: 1995/msg00114.html On Jun 19, 10:58am, H.J. Lu wrote: > That is what I thought. While I am on it, let me ask one more > question :-(. Is DT_TEXTREL supported? Or should it be? Yes. This one should only occur if you attempt to create a shared library from non-PIC code, as the .text section will then need to have relocations applied. The DT_TEXTREL tells the dynamic loader that it needs to mprotect the .text section to make it writable before applying relocations, and once we are through, we need to set them back again. The dynamic loader should be doing this correctly - someone did accidentally make a shared library from non-PIC code as I recall. They were complaining that dynamic linking was broken (not surprising), but it worked otherwise, which would tend to suggest that the linker is inserting DT_TEXTREL and the dynamic loader is doing the right thing with it. I am trying to grab the latest binutils sources - I will take a look at DT_SYMBOLIC. -Eric -- "The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."