This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Question] patch-design for Solaris ld.so-startup



> I'd very much prefer if the sparc32/dl-machine.h code which cannot
> be used on Solaris was moved to
> sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/dl-machine.h
> and
> sysdeps/unix/sysv/linux/sparc/sparc32/dl-machine.h, which would in turn
> #include <sysdeps/sparc/sparc32/dl-machine.h>.
> That way it wouldn't be cluttered with the ugly #ifdefs.

Ok. Just the way i thought where the benefits are ...
I will do the changes and make the tests again.

> 
> > Assumption 2:
> >    dl-machine.h assumes that register %l7, at the time of startup, 
> >    for all OS's contains the link-time address of _DYNAMIC.
> 
> Nope, it assumes that %l7 points to __GLOBAL_OFFSET_TABLE__.
> And .got[0] has the link-time address of _DYNAMIC.

You are right and i've read it interested as you have described 
it elsewhere. - The `Solaris Linker and Libraries Manual' exactly 
describes this too like you do: 
"Global Offset Table (Processor-Specific): 
...
The tables entry zero is reserved to hold the address of the 
dynamic structure, referenced with the symbol _DYNAMIC.
This allows a program, such as the dynamic linker, to find 
its own dynamic structure without having yet processed its
relocation entries ..."

This sentences leaded me to the code-change for Solaris.
But i've seen no hint concerning registers (or %l7) in 
this handbook, even so the chapter is titled "Processor-Specific".

> Does %l7 point on Solaris into the middle of .got instead?

I simply have forgotten where %l7 points to. My dark memory points
"into the middle of .nowhere instead" ... sorry ;-)
(Btw.: Isn't this a question of the kernel-behaviour at the time of 
process-creation; especially when ld.so is run as a program?)
When you are interested, I will try to look at it again.
This will at least retrain my knowledge about gdb and a DSO.

> With GNU ld or Solaris ld?

GNU ld

> 
> 	Jakub

thanks for your answer!

greetings 
Gert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]