This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where can I get the defination __i686.get_pc_thunk.bx function in an objectdump a test program linked with a shared library??

It usually winds up in a section with a name like .text.__i686.get_pc_thunk.bx. It doesn't necessarily wind up in the .text section, though it should certainly be in the text segment. In any case, you readelf -s to see whether and where it is defined.


First, thanks for your reply. I havn't expected to get answer from the blog author :)

Are you mean to list symbols info with "readelf -s ./" ?? There isn't the
symbol in the output.

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; \
# 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 using "readelf -l ./", 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.

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