English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Asm / Hardware (http://eab.abime.net/forumdisplay.php?f=112)
-   -   VLINK multiple VASM objects (http://eab.abime.net/showthread.php?t=82475)

roondar 23 April 2016 17:54

VLINK multiple VASM objects
I have a bit of a conundrum on my hands.

I have been linking several object files output by VASM together using VLINK. This works fine.

However, changing the order of the files in the linker arguments also changes the application entry point - whichever file is first always gets called into. Now, I've tried using the -e flag to get VLINK to use a different entry point, but to no succes.

I can't figure out how to define the entry point in my assembly files. I've tried -e and using an _start label in my code as well as -e <label> with a that label in my code. Neither works.

My feeling is I'm overlooking something very simple. But I can't figure it out. So: how should I do this to get it to work?

phx 23 April 2016 22:24

Not all vlink options are valid for all output file formats. Setting the entry point with -e works for ELF executables, but not for Amiga hunk-format executables. They always start at the first byte of the first section.

That's not a limitation of vlink, but of AmigaDOS hunk-format.

roondar 24 April 2016 02:03

Ah, that explains that.
Thanks for the answer, I'll just link the startup code as first file then!

All times are GMT +2. The time now is 10:17.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.04060 seconds with 11 queries