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]

Re: Error: cannot represent relocation type BFD_RELOC_64


sorry for incomplete information ::

On Sun, Dec 7, 2008 at 2:29 PM, Ramana Radhakrishnan <ramana.r@gmail.com> wrote:
> You haven't said what options you are using for compilation and what
compilation command ::
gcc -I/usr/src/linux-headers-2.6.27-9/include/ application.c log.c -lpthread

> version of the tools you are using . Also it would be useful to
avatar@pe-lt293:~/ssd log/code$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.2-1ubuntu11'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --enable-checking=release
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)
avatar@pe-lt293:~/ssd log/code$ as -v
GNU assembler version 2.18.93 (i486-linux-gnu) using BFD version (GNU
Binutils for Ubuntu) 2.18.93.20081009


> mention the architecture for which you are compiling for .... :)
same archietecture as of the compiler and assembler...
thaankx
kanishk

>


>
> Ramana
>
>
>
> On Sat, Dec 6, 2008 at 3:18 PM, kanishk rastogi <kanishk.85@gmail.com> wrote:
>> ---------- 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]