• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Linker error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Linker error


  • Subject: RE: Linker error
  • From: Norm Green <email@hidden>
  • Date: Fri, 21 Dec 2007 14:51:46 -0800

Turns out the Darwin linker does not like the jrcxz instruction for some reason.  Perhaps because it uses a 2 byte (length == 1) displacement?  The error message seemed to indicate only 4 byte displacements (length == 2) were valid.  

 

Replacing jrcxz with:

 

cmp $0, %rcx

je .LocalLabel

 

…fixes the problem.

 

It would seem the Darwin assembler and linker are not in sync.

 

Norm Green

 

 


From: Norm Green
Sent: Thursday, December 20, 2007 6:20 PM
To: 'email@hidden'
Subject: Linker error

 

I’m getting this error from the linker on Leopard:

 

ld: in intloop_darwin_x86_64.o, in section __TEXT,__text reloc 278: length != 2 and X86_64_RELOC_BRANCH not supported

 

Can someone please explain what I’m doing wrong?  This is being compiled/assembled/linked in 64 bit mode.

 

The file intloop_darwin_x86_64.o is generated by the assembler ‘as’.  Versions are below:

 

email@hidden:246 % as -v

Apple Computer, Inc. version cctools-667.3~21, GNU assembler version 1.38

 

email@hidden:250 % ld -v

@(#)PROGRAM:ld  PROJECT:ld64-77

 

 

 

Thanks,

 

Norm Green

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: DTrace and C++ function
  • Next by Date: Configure and multiple OS X archs
  • Previous by thread: Re: Linker error
  • Next by thread: checking library to see if is universal?
  • Index(es):
    • Date
    • Thread