What is the difference between ‘shared library text’ and ‘shared library data’? Also, what does it mean for shared library data to be ‘pre-relocated’? This question is in reference to a couple of AIX-specific features involving shared libraries.
What is the difference between shared library text and shared library data? Also, what
Share
Ah, that’s a tricky question.
Alright, so to answer it, you’ve got to know that an executable file has two* segments: a ‘text’ section and a ‘data’ section.
The ‘data’ segment contains ‘stuff that won’t get executed’. For example, strings in the program (for example, the string ‘Command not found’ would be in the data segment of the
/bin/shbinary).The ‘text’ segment contains ‘stuff that will get executed’ — the machine instructions.
And, the ‘pre-relocated’… There is a fairly good explanation of why relocation is needed here: http://people.redhat.com/drepper/textrelocs.html and what is involved here: http://en.wikipedia.org/wiki/Relocation_(computer_science).
Does that help?
*: nitpicker note: it’s got more than two, but that’s not important right now