This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Yes, it appears that the symbol shlib_shlibvar1, which names a
function in the text section that has its address taken at various
points, has gotten moved in the shared library to the .plt section.
(The correct code is still in the text section, just without a name.)
The code at that .plt location, at run time, becomes a very tight
loop. In the .so file:
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
...
00010790 R_SPARC_JMP_SLOT shlib_shlibvar1
...
Disassembly of section .plt:
00010754 <shlib_shlibcalled-30>:
...
00010784 <shlib_shlibcalled>:
10784: 03 00 00 30 sethi %hi(0xc000), %g1
10788: 30 bf ff f3 b,a 10754 <_PROCEDURE_LINKAGE_TABLE_>
1078c: 01 00 00 00 nop
00010790 <shlib_shlibvar1>:
10790: 03 00 00 3c sethi %hi(0xf000), %g1
10794: 30 bf ff f0 b,a 10754 <_PROCEDURE_LINKAGE_TABLE_>
10798: 01 00 00 00 nop
1079c: 03 00 00 48 sethi %hi(0x12000), %g1
107a0: 30 bf ff ed b,a 10754 <_PROCEDURE_LINKAGE_TABLE_>
107a4: 01 00 00 00 nop
107a8: 01 00 00 00 nop
And run time:
(gdb) x/20i &shlib_shlibvar1
0xef7a0790 <shlib_shlibvar1>: sethi %hi(0xf000), %g1
0xef7a0794 <shlib_shlibvar1+4>: sethi %hi(0xef7a0400), %g1
0xef7a0798 <shlib_shlibvar1+8>:
jmp %g1 + 0x390 ! 0xef7a0790 <shlib_shlibvar1>
0xef7a079c <shlib_shlibvar1+12>: sethi %hi(0x12000), %g1
I'm not familiar with the shared library linker support, so for the
moment, I'll leave the rest to Richard.
Ken