This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: Error: cannot represent relocation type BFD_RELOC_64


---------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]