English Amiga Board


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

 
 
Thread Tools
Old 18 November 2017, 18:59   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
vasm "undefined symbol" is driving me nuts

Is there an option in vasm to stop on error when symbol isn't found instead of declaring it as external?

I get a lot of unresolved symbols when linking, just because some symbols aren't defined and that's VERY annoying since I have to search in the asm source for the symbol instead of getting the line of the error directly
jotd is offline  
Old 18 November 2017, 21:09   #2
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Hmm, I don't think you generally can.

You can kind of do something similar as long as you only have one .asm file, by using -Fbin. That'll give errors during assembly for any symbol not defined in the .asm file being assembled.

However, the -Fbin format can't resolve external dependencies so it's probably not going to fix the problem.
roondar is offline  
Old 20 November 2017, 17:29   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Of course you can: -x
phx is offline  
Old 24 November 2017, 16:21   #4
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
this is somehow related, since I got that error message too.

I try to build an object file from the code below and I only get an outputfile,
which looks like a debug file:
Code:
*
* SAS server startup module
* Copyright 1995  NewTek, Inc.
* machine generated -- do not edit
*
	xdef    __XCEXIT
	xref    __Startup
	xref    __Shutdown
	xref    _ServerDesc

	section text,code

	moveq   #0,d0
	rts
	dc.l    $04121994
	dc.l    $2
	dc.l    $100
	dc.l    __Startup
	dc.l    __Shutdown
	dc.l    _ServerDesc

__XCEXIT:
	dc.l    $0
	dc.l    $0
	dc.l    $0

	end
using vasm -m68020 -x serv_s.a
with vasm -m68020 -Fbin serv_s.a I get the undefined symbol message.

I need a gcc compatible object file.
emufan is offline  
Old 25 November 2017, 20:44   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
This is a perfectly valid source. Three undefined symbols: __Startup, __Shutdown and _ServerDesc. All three are even declared by XREF. Having -x or not is irrelevant here.

You get "undefined symbol" with -Fbin, because -Fbin generates a raw binary output file. It cannot do that with unresolved symbol references.

You rather want to generate an object file, where such symbol references are allowed and resolved by a linker.

Use -Fhunk for AmigaOS hunk-format object files, or -Faout for Unix a.out format, supported by gcc.
phx is offline  
Old 03 December 2017, 16:36   #6
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
-x is what I was looking for, thanks!
jotd is offline  
Old 03 December 2017, 20:17   #7
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by phx View Post
Use -Fhunk for AmigaOS hunk-format object files, or -Faout for Unix a.out format, supported by gcc.
thnx, little late, just tested: it does work as described.
plugin builds. but LW's modeller does not recognizes it. :/
emufan 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
"Voices8" 8 Channel Soundtracker "DemoSongI" song - "This is the Amiga with 8 Voices" DemosongIHunter request.Music 45 23 May 2022 20:07
PFS3AIO is driving me nuts - help :( Nostromo support.Apps 4 07 September 2017 16:14
Reference to undefined symbol __ldivu / __lmodu iliak Coders. C/C++ 8 25 July 2016 00:01
AsmOne: Undefined symbol copse Coders. Asm / Hardware 2 02 April 2012 01:41
Undefined symbol bsr.b init_bitmaps VoltureX Coders. General 12 13 November 2011 16:11

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:29.

Top

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