This is the mail archive of the gcc-help@gcc.gnu.org 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: Force GCC not to use relative addresses for asm-CALL-statements


On Sat, Jan 7, 2012 at 8:01 PM, augomat <augomat@gmail.com> wrote:
>
> hi!
>
> compiling an ordinary C programm, function-calls are (at least on my
> computer) translated to something like:
>
> E8 56070000 Â Â Â Â CALL <JMP.&msvcrt.printf>
>
> where the operand 1 (56070000) is of type: rel16/32
>
> can i force gcc to produce only CALLS (and jumps, ...) that have absolute
> addresses as their operands?
You need to bind the executable
(http://msdn.microsoft.com/en-us/magazine/cc301808.aspx). Visual
Studio includes a tool to do it from the command line. I'm not sure if
GCC offers a switch or GNU offers a tool to do it.

Jeff


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