Re: [cc65] Another linker Q/R

From: <silverdr1wfmh.org.pl>
Date: 2013-02-22 18:44:43
On 2013-02-22, at 06:45, Shawn Jefferson wrote:

>> Now I am not sure if I get it right but I think more or less so :-) I
>> would like to define the names in the linker config and only in the linker
>> config. So that whenever the file names change, one doesn't have to hunt
>> through all the files to change those. Some kind of mechanism would be
>> needed to allow this. Like predefined placeholder symbol or something. One
>> could then reference a symbol like e.g. __MYMEMORYENTRY_FILENAME__, which
>> would be replaced upon linking with appropriate string and (again for a
>> good example) e.g. __MYMEMORYENTRY_FILENAME_LENGTH__ would contain what it
>> says. This more or less means that linker would have to place the string
>> where the symbol is so that the file names defined in the linker config
>> would be accessible from the code.
> 
> Can't you do this with a Makefile and some scripts?  Read the info from the
> linker config and generate an include file?

Well, with some grep-ing, awk-ing and sed-ing I can possibly do most of tricky things like this one. It is just that it doesn't seem too appealing to do it this way. If there is already an elegant way of dealing with data segments (using external symbols), maybe something similar could be done for this use case. And maybe it can be useful not only for me.

-- 
SD!----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Feb 22 18:44:54 2013

This archive was generated by hypermail 2.1.8 : 2013-02-22 18:44:58 CET