Couldn't find the dynamic reference of the function in Global Offset Table

79 views Asked by At

I have made a go plugin which contains references to third party libraries. So I have a sample function which looks like this:

CreateEchoObject() *echo.Echo {
  e := echo.New()
}

The disassembled code of CreateEchoObject contains:

callq  8b9ab0 <_init+0xf0>

8b9ab0 is present in plt.got table.

Here everything is working well, but for one of my other functions it does not.

func HttpRouterNew() *Router {
    router := httprouter.New() 
}

For the above function the disassembled code looks like this:

<projects/package.HttpRouterNew>:
  mov    0x8f1a21(%rip),%rcx        # 1736b08 <_GLOBAL_OFFSET_TABLE_+0xd18>
  mov    %fs:(%rcx),%rcx
  cmp    0x10(%rcx),%rsp
  jbe    e4522a <projects/package.HttpRouterNew+0x14a>
  sub    $0x30,%rsp
  mov    %rbp,0x28(%rsp)
  lea    0x28(%rsp),%rbp
  mov    0x8f2e5e(%rip),%rax        # 1737f68 <_GLOBAL_OFFSET_TABLE_+0x2178>
  mov    %rax,(%rsp)
  callq  8cab60 <runtime.newobject>
  mov    0x8(%rsp),%rax

As you can see, there is no call similar to the above function. Using an elf file parser, I have found The symbol name of 1737f68 in GOT is type.EFOOALAY and 1736b08 is runtime.tlsg. Also I cannot find any reference to httprouter.New in the plt.got table.

0

There are 0 answers