This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fwd: Error: cannot represent relocation type BFD_RELOC_64
- From: "kanishk rastogi" <kanishk dot 85 at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 6 Dec 2008 20:48:37 +0530
- Subject: Fwd: Error: cannot represent relocation type BFD_RELOC_64
- References: <9ee2fe770812060007k4512fc2bs5148836e7a33996c@mail.gmail.com>
---------- Forwarded message ----------
From: kanishk rastogi <kanishk.85@gmail.com>
Date: Sat, Dec 6, 2008 at 1:37 PM
Subject: Error: cannot represent relocation type BFD_RELOC_64
To: binutils@sources.redhat.com, binutils@sourceware.org
i was trying to compile atomic_32.h in user space which is present in
linux kernel code ...
while doing so ... i got this error.....
atomic_32.h:28: Error: cannot represent relocation type BFD_RELOC_64
atomic_32.h:34: Error: cannot represent relocation type BFD_RELOC_64
atomic_32.h:40: Error: cannot represent relocation type BFD_RELOC_64
the corresponding code is ::
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
unsigned long new, int size)
{
unsigned long prev;
switch (size) {
case 1:
asm volatile(LOCK_PREFIX "cmpxchgb %b1,%2"
: "=a"(prev)
: "q"(new), "m"(*__xg(ptr)), "0"(old)
------------------>28
: "memory");
return prev;
case 2:
asm volatile(LOCK_PREFIX "cmpxchgw %w1,%2"
: "=a"(prev)
: "r"(new), "m"(*__xg(ptr)), "0"(old)
----------------->34
: "memory");
return prev;
case 4:
asm volatile(LOCK_PREFIX "cmpxchgl %1,%2"
: "=a"(prev)
: "r"(new), "m"(*__xg(ptr)), "0"(old)
---------------------->40
: "memory");
return prev;
}
return old;
}
----
what am i doing wrong...
thankx
kanishk