error: "expression too complex"; complex relocation? (correction)

Peter Tanski peter_tanski at cox.net
Fri Dec 8 12:18:17 PST 2006


Hello,

I recently posted a message with some example assembler output on  
what seemed to be a complex relocation error.  Unfortunately I posted  
example code in PowerPC assembler without realising it!  (Problems  
with working between two operating systems remotely, I guess.)  There  
really isn't a problem with this example of x86 output from GHC:

.data
	.align 2
.globl _Main_lvl_closure
_Main_lvl_closure:
	.long	_Main_lvl_info
	.long	0
.text
	.align 2
.globl _Main_lvl_srt
_Main_lvl_srt:
	.long	_base_GHCziIO_hPutStr_closure
	.long	_base_GHCziHandle_stdout_closure
	.long	_base_GHCziTopHandler_lvl5_closure
	.long	_base_GHCziTopHandler_lvl9_closure
	.long	_base_GHCziIO_zdwhPutChar_closure
	.long	_Main_a_closure
.text
	.align 2
	.long	_Main_lvl_srt - _Main_lvl_info
	.long	65539
	.long	0
	.long	4128783
.globl _Main_lvl_info
_Main_lvl_info:
.text


	leal	-12(%ebp), %eax
	cmpl	84(%ebx), %eax
	jb	L23
	movl	$_Main_a_closure, -8(%ebp)
	movl	$_base_GHCziHandle_stdout_closure, -12(%ebp)
	movl	$_s1rQ_info, -4(%ebp)
	movl	%eax, %ebp
	jmp _base_GHCziIO_hPutStr_info
	.p2align 4,,7
L23:
	movl	$_Main_lvl_closure, %esi
	jmp	*-4(%ebx)

Cheers,
Pete


More information about the yasm-devel mailing list