DT_SYMBOLIC and -Bsymbolic

Eric Youngdale eric@aib.com
Mon Jun 19 08:13:00 GMT 1995

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.


"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."

More information about the Gas2 mailing list