This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Calling equ'd symbols in GAS
On Fri, Jul 29, 2011 at 01:10:59AM -0500, Eduardo Cavazos wrote:
>
> On Fri, 2011-07-29 at 15:30 +0930, Alan Modra wrote:
>
> > 8048054: e8 e7 7f 0b f8 call 100040 <b_print_newline>
>
> Right. Notice the difference from the NASM and FASM disassemblies:
>
> 0: e8 3b 00 f0 ff callq 0xfffffffffff00040:
>
> I'm just wondering how to port the NASM example to GAS.
The only difference in the above is the address that the files are
linked at. So..
$ ld/ld-new -Ttext=0x200000 -o equcall equcall.o
$ objdump -d equcall
equcall: file format elf32-i386
Disassembly of section .text:
00200000 <_start>:
200000: e8 3b 00 f0 ff call 100040 <b_print_newline>
200005: c3 ret
$
--
Alan Modra
Australia Development Lab, IBM