This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Force GCC not to use relative addresses for asm-CALL-statements
- From: Jeffrey Walton <noloader at gmail dot com>
- To: augomat <augomat at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 7 Jan 2012 20:18:57 -0500
- Subject: Re: Force GCC not to use relative addresses for asm-CALL-statements
- References: <33100719.post@talk.nabble.com>
- Reply-to: noloader at gmail dot com
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