Error Cannot Represent Relocation Type Bfd_reloc_64
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up BFD_RELOC_64: Compiling assembler directives on a 32 bit linux with C++ up vote 0 down vote favorite I'm trying to compile the code below on a 32 bit Linux with GCC 4.4.1. #ifndef WIN32 #define DEBUG_STOP_POINT() \ asm ( " 0 : int3 ; " \ " .pushsection embed-breakpoints ; " \ " .quad 0b ; " \ " .popsection ; " ) #if defined ( _DEBUG ) && defined ( _ASPECT_DEBUG ) #define THROW_BREAKPOINT() \ asm ( " 0 : int3 ; " \ " .pushsection embed-breakpoints ; " \ " .quad 0b ; " \ " .popsection ; " ) #else #define THROW_BREAKPOINT() \ asm ( " 0 : .pushsection embed-breakpoints ; " \ " .quad 0b ; " \ " .popsection ; " ) #endif #else #define DEBUG_STOP_POINT() #define THROW_BREAKPOINT() #endif It was taken from a 64 bit project running on the 64 bit version of the same Linux where it compiles without problems with the same GCC 4.4.1. Every place where THROW_BREAKPOINT() (the DEBUG_STOP_POINT() is never used) is used issues the compile error: "cannot represent relocation type BFD_RELOC_64." And now the questions: What does this code ? These asm directives are 64 bit only ? Is so, could you, please, rewrite it in order to do the same thing on my 32 bit system (32 bit Intel Celeron M) ? May I suspect a compiler installation issue (the compiler and the required dependencies were installed from rpms on top of the existing and newer gcc using rpm -ivh --force options)? In this case, could you give me am example of code using asm directives which should compile on my 32 bit box ? What else may I try to fix the compile error (well, something different of using empty definitions as it is for the WIN32 case) ? c++ linux gcc assembly share|improve this question edited
text] Re: Error: cannot represent relocation type BFD_RELOC_64 From: Nick Clifton
7 messages kanishk rastogi Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Fwd: Error: cannot represent relocation type BFD_RELOC_64 ---------- Forwarded message ---------- From: kanishk rastogi <[hidden email]> Date: Sat, Dec 6, 2008 at 1:37 PM Subject: Error: cannot represent relocation type BFD_RELOC_64 To: [hidden email], [hidden email] i was trying to compile atomic_32.h in user space which is present in http://sourceware-org.1504.n7.nabble.com/Fwd-Error-cannot-represent-relocation-type-BFD-RELOC-64-td139365.html 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, http://marc.info/?t=131175425500002&r=1&w=2 unsigned long new, int size) { unsigned long prev; switch (size) { case 1: asm error cannot 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) error cannot represent : "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 Ramana Radhakrishnan Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Error: cannot represent relocation type BFD_RELOC_64 You haven't said what options you are using for compilation and what version of the tools you are using . Also it would be useful to mention the architecture for which you are compiling for .... :) Ramana On Sat, Dec 6, 2008 at 3:18 PM, kanishk rastogi <[hidden email]> wrote: > ---------- Forwarded message ---------- > From: kanishk rastogi <[hidden email]> > Date: Sat, Dec 6, 2008 at 1:37 PM > Subject: Error: cannot represent relocation type BFD_RELOC_64 > To: [hidden email], [hidden email] > > > 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 repre
- 2016-11-01 (759 messages) 1. 2011-08-06 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl at gcc dot gnu 2. 2011-08-02 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl at gcc dot gnu 3. 2011-08-02 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs ubizjak at gmail d 4. 2011-07-29 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl at gcc dot gnu 5. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl.tools at gmail 6. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl.tools at gmail 7. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs ubizjak at gmail d 8. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl.tools at gmail 9. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs ubizjak at gmail d 10. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl.tools at gmail 11. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs ubizjak at gmail d 12. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs hjl.tools at gmail 13. 2011-07-27 [Bug target/49860] [x32] Error: cannot represent relo gcc-bugs ubizjak at gmail d Configure | About | News | Addalist | SponsoredbyKoreLogic