Re: [cc65] ca65 as crosscompiler

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2013-10-14 14:24:22
Hi!

On Mon, Oct 14, 2013 at 09:47:16AM +0200, Christian Groessler wrote:
> >Assuming that you mean the assembler program from the last post: Because ca65
> >always emits the default segments. So the segments named CODE, DATA, BSS and
> >so on are always present in the generated object file, but they're empty if
> >unused in the code. This is different from other, user specified segments
> >(like LOWCODE or INIT).
>
> Why?
>
> Is it just for convenience or is there another reason?

At the time, when I built this into ca65, there was no "optional" keyword for
the segment definition in the linker config. Without this, one would always
get warnings for C programs that didn't have all segments. The easiest
solution at that time was to always add empty default segments when the
assembler wrote the object file.

Today, it would be possible to remove the empty segments from the object file
and mark the segments as "optional" in the linker config. But on the othr
side, the empty segments won't harm.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
Encrypted email preferred                          PGP Key-Id: 29D93B10
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Oct 14 14:24:30 2013

This archive was generated by hypermail 2.1.8 : 2013-10-14 14:24:31 CEST