I compile a program on an asm for 32-bit Linux on a 64-bit Ubuntu system. At first the code did not compile, it gave an error:

skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/6/libgcc.a when searching for -lgcc cannot find -lgcc skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/6/libgcc.a when searching for -lgcc cannot find -lgcc collect2: error: ld returned 1 exit status 

I installed gcc-multilib - everything worked, only the code was created without springboards: the call XXX call leads directly to the function, and not to jmp , which jumps to the function (just like in Windows, the dll-function is called).

I also need to desperately for the call to lead to the springboard. How to do it? Maybe some keys need to stamp special for gcc or something else?

  • I do not understand what is the use of extra jmp ... - Qwertiy
  • In that it is possible, for example, to change a function (modify it properly). - Jin X
  • I mean, I understand how this can be used, but I don't understand why the compiler should want to do it. By the way, you can jmp and shove inside the function. - Qwertiy
  • @Qwertiy, because, as far as I understand, this is normally happening. I have one people threw a program in which it is. And he has no problems with compiling without any gcc-multilib there . Well, there are manuals where it is written about it (that there should be a springboard). The problem may have occurred as a result of installing gcc-multilib . Or maybe not - I do not know. Well, to put jmp inside a function, you need to have write access to the executable code. - Jin X
  • I had in mind when compiling to add an intermediate function, which the assembler inserts makes jmp to the desired one and inline to the place of its call. And stop. And how are you without the right to write to the executable code going to replace the jmp'a address? - Qwertiy

0