"Yihe Chen" <yihect@xxxxxxxxxxxxxx> writes: > Are you mean to list symbols info with "readelf -s ./libsub.so" ?? > There isn't the > symbol in the output. A shared library with no symbols is not very useful. If there are no symbols then I suspect something has gone wrong somewhere. > Apropos of .text.__i686.get_pc_thunk.bx section. I found there is > something like this in > the source code of glibc, in ./sysdeps/unix/sysv/linux/i386/sysdep.h: > > # ifndef HAVE_HIDDEN > # define SETUP_PIC_REG(reg) \ > call 1f; \ > .subsection 1; \ > 1:movl (%esp), %e##reg; \ > ret; \ > .previous > # else > # define SETUP_PIC_REG(reg) \ > .section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits; \ > .globl __i686.get_pc_thunk.reg; \ > .hidden __i686.get_pc_thunk.reg; \ > .type __i686.get_pc_thunk.reg,@function; \ > __i686.get_pc_thunk.reg: \ > movl (%esp), %e##reg; \ > ret; \ > .size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg; \ > .previous; \ > call __i686.get_pc_thunk.reg > # endif > > > It seems that the __i686.get_pc_thunk.bx is definded in section > .gnu.linkonce.t.__i686.get_pc_thunk.bx. Is this true?? When gcc is generating the symbol directly, as is normal, the section in which it is defined depends on whether the linker supports section groups or not. If it does not, gcc will use a .gnu.linkonce section as in the above. If it does, gcc will use a .text. section marked as a COMDAT section group. > When using "readelf -l ./libsub.so", I haven't found one section named > like this in > .text segment. So is the section > .gnu.linkonce.t.__i686.get_pc_thunk.bx. got deleted > in linking process? I'm not sure of this, but there is a "linkonce" in > the name of the section. The section should not get deleted during the link, though in some cases it may get merged into the .text section. But first you have to find out what happened to all your symbols. Ian