bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GOT error in gas


From: Mikulas Patocka
Subject: Re: GOT error in gas
Date: Mon, 12 Feb 2007 20:41:13 +0100 (CET)

On Mon, 12 Feb 2007, Andreas Schwab wrote:

Mikulas Patocka <address@hidden> writes:

__asm__ (".global number; number = 0x12345678");
extern void number;

These two declarations are not compatible.  The latter declares number as
a data symbol, but the former defines it is an absolute symbol.  Thus what
you get is undefined behaviour.

Andreas.

Hi

I thought that .types do not care for linking, I never ran into problem with different .types on symbols. BTW. if you look at assembler, there are no .type directives regarding "number" at all.

How otherwise should external C variables be placed at absolute locations? (I need variables and function on absolute locations quite often and I always used this method)

Mikulas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]