This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gas, x86-64, Linux vs. FreeBSD/OpenSolaris
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Bob Plantz <plantz at cds1 dot net>
- Cc: binutils at sourceware dot org
- Date: Fri, 30 Jan 2009 14:39:12 -0800
- Subject: Re: gas, x86-64, Linux vs. FreeBSD/OpenSolaris
- References: <1233354371.5839.25.camel@bob-desktop>
On Fri, Jan 30, 2009 at 2:26 PM, Bob Plantz <plantz@cds1.net> wrote:
> I am working on x86-64 in 64-bit mode. I'm using gas.
>
> In Linux I can dereference a 32-bit register as shown on the second line
> below "whileLoop" in the code below. But when I try to assemble it under
> OpenSolaris or FreeBSD (also in 64-bit mode), I have to use the full
> 64-bit register.
>
> The error message comes from gas. So it's clear that gas has been built
> differently for Linux than for the other two systems. Can anyone help me
> understand (a) how this is done, and (b) why it is done?
>
Your FreeBSD binutils may be too old. You can use
# ld -V
to compare the binutils version.
--
H.J.