This is the mail archive of the
mailing list for the binutils project.
Re: [z80-coff-ld] how can I use ld for creating an exe from z80-coff-as ?
- From: Chris Smith <chris at zxdesign dot info>
- To: jseb <gmane2010 at finiderire dot com>, binutils at sources dot redhat dot com
- Date: Thu, 9 Aug 2012 11:11:30 +0100
- Subject: Re: [z80-coff-ld] how can I use ld for creating an exe from z80-coff-as ?
- References: <firstname.lastname@example.org> <20120221215233.GL3678@bubble.grove.modra.org>
I do a lot of complicated Z80 development using binutils, and have set
up a z80 specific makefile that sorts this all out. I include this
makefile in all my project makefiles to provide all the functionality
I need. I also have a platform specific linker script that defines
useful memory regions that I use. I can then target code to the memory
regions/segments as necessary.
Extracting the final linked binary is done through objcopy, with
listing dumps and map output done through objdump. It does what you
expect, and works beautifully for me at least.
Happy to share this base makefile and linker scripts with you, with
some examples (been meaning to write it all up and publish on my
On 21 February 2012 21:52, Alan Modra <email@example.com> wrote:
> On Tue, Feb 21, 2012 at 10:06:41PM +0100, jseb wrote:
> > ... to my .org setting.
> .org doesn't do what you think it does. gas isn't an absolute
> assembler, but instead produces relocatable object files. .org just
> adds space to make the offset from the start of the current section
> equal to its argument.
> You're on the right track in your use of a linker script to set the
> start of your code. Just leave out the .org in the assembly code.
> Alan Modra
> Australia Development Lab, IBM