English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 23 May 2013, 22:10   #1
clenched
Registered User
 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
Help linking VASM object code

Code:
   ;x.asm
   xref   _LVOSuperState
   jsr    _LVOSuperState(a6)
I'm having trouble getting VASM to create an object file that can be linked.

Code:
 
{Windows}
c:\vasm>vasmm68k_mot c:\x.asm -Fhunk -o c:\a.o
vasm 1.6b (c) in 2002-2013 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 1.3e (c) 2002-2013 Frank Wille
vasm motorola syntax module 3.4a (c) 2002-2013 Frank Wille
vasm hunk format output module 2.3 (c) 2002-2012 Frank Wille
CODE(acrx2):               4 byte
then...
Code:
 
{WinUAE}
1.WinDH_C:> phxlnk a.o LIB:amiga.lib TO x
Unknown XREF type in unit "c:\x.asm" of "a.o" !
1.WinDH_C:> blink FROM a.o TO x LIB LIB:amiga.lib
Blink - Version 6.7 - 15 October 1986
Copyright © 1986 The Software Distillery.  All Rights Reserved.
235 Trillingham Lane, Cary NC 27511 - BBS: (919)-471-6436
Error 446: Invalid symbol type 138 for _LVOSuperState
1.WinDH_C:> alink a.o TO x LIB LIB:amiga.lib
Amiga Linker Version 2.32
Copyright (C) 1986 Metacomco plc.
All rights reserved.
Linker error: invalid type 0000008A for "4" in file "a.o"
 - linking abandoned
1.WinDH_C:> slink FROM a.o TO x LIB LIB:amiga.lib 
Slink - Version 6.50
Copyright (c) 1988-1993 SAS Institute, Inc.  All Rights Reserved.
Error 446: Invalid symbol type 138 for _LVOSuperState
If I create an object file with PhxAss, C.A.P.E., asm, ( who knows how many others? ) then all the linkers work.
Vlink was the only one that could successfully link VASM object.
How do I make VASM object code compatible with old linkers?
.

Last edited by clenched; 24 May 2013 at 02:50. Reason: typo++
clenched is offline  
Old 24 May 2013, 12:22   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by clenched View Post
Code:
   ;x.asm
   xref   _LVOSuperState
   jsr    _LVOSuperState(a6)
...
Code:
Error 446: Invalid symbol type 138 for _LVOSuperState
That's an EXT_ABSREF16 reference (refer to doshunks.h), which is absolutely correct. The reference to _LVOSuperState in the operand of JSR is an absolute 16-bit displacement.

From dos/doshunks.h:
Code:
#define EXT_ABSREF16    138     /* 16 bit absolute reference to symbol */
Quote:
Originally Posted by clenched View Post
Vlink was the only one that could successfully link VASM object.
How do I make VASM object code compatible with old linkers?
That would be my task. I could add an option to be compatible with old linkers. I must say that I'm surprised that no other linker supports it.

The EXT_ABSREF16 define was added lately to doshunks.h (either for AmigaOS2.x or 3.x). Before that assemblers used EXT_REF16 (131), which is now known as EXT_RELREF16 and is a PC-relative 16-bit reference, which would be wrong here, IMHO.

BTW, what is wrong with using vlink?
phx is offline  
Old 24 May 2013, 22:32   #3
clenched
Registered User
 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
phx - Thank you for that good explanation. There is no reason not to use Vlink. I just had the other ones at hand and know them, that's all. For now, I'm satisfied to know the reason for this trouble.
clenched is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest Win32 VASM Build? bodhi Coders. Asm / Hardware 89 25 August 2017 01:27
vasm and word alignment Den Coders. Asm / Hardware 9 07 February 2014 11:25
vasm fsincos dalton Coders. Asm / Hardware 4 03 September 2012 10:35
vasm 1.5 RFC phx Coders. General 30 11 December 2010 02:08
Lightwave Object Request Steve request.Apps 8 24 November 2006 01:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08449 seconds with 13 queries