title: linux asm problem: calling extern function
body: <p>On linux </p>
  
  <h2>file1.s:</h2>
  
  <pre><code>.text
  .globl MyFunc
  Func:
          ....
   call my_jump
   ret  
  </code></pre>
  
  <h2>file2.h:</h2>
  
  <pre><code>extern "C" FUNC_NO_RETURN  void  my_jump();
  </code></pre>
  
  <h2>file3.cpp:</h2>
  
  <pre><code>extern "C" __attribute__((noinline)) void my_jump()
  {
       return;
  }
  </code></pre>
  
  <p>when linking my module which calls "MyFunc", i get the following error: (previosly before adding a call to my_jump inside the asm code, everything was OK)</p>
  
  <p><code>"relocation R_X86_64_PC32 against 'longjmp_hack' can not be used when making a shared object; recompile with -fPIC"</code></p>
  
  <p>any ideas?</p>