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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Yihe Chen" <yihect@xxxxxxxxxxxxxx> writes:

>  I'm studing ELF topic. I have made a shared object(libsub.so), and
> have compiled a test program with
> the so lib. The steps is following:
>
>  gcc -fpic -o sub.o ./sub.c
>  gcc -fpic -shared -o libsub.so ./sub.o
>  gcc -o test ./test.o -L. -lsub
>
> Ian Lance Taylor introduced a function: __i686.get_pc_thunk.bx  in
> his blog articles at URL:
>
> http://www.airs.com/blog/archives/41
>
> But When I want to look up the function in OBJDUMP'ed  .text section
> of test program, It's not there:
>
>   objdump -d -j .text ./test
>
> I have found the functiong is defined in glibc's source code, but how
> can I see it from the OBJDUMP'ed  context.
> Does the section containing that function be placed in the text
> program????? 

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.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux