/* */
/* */
/* */
-/* (C) 1998-2000 Ullrich von Bassewitz */
+/* (C) 1998-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* Remember the attributes read */
unsigned OS = 0; /* Initialize to keep gcc happy */
- unsigned ID = 0; /* Dito */
unsigned Version = 0;
/* Read the attributes */
/* We're expecting a number in the 0..$FFFF range*/
CfgAssureInt ();
CfgRangeCheck (0, 0xFFFF);
- ID = (unsigned) CfgIVal;
+ ModuleId = (unsigned) CfgIVal;
break;
case CFGTOK_VERSION:
}
/* Set the O65 operating system to use */
- O65SetOS (O65FmtDesc, OS, Version, ID);
+ O65SetOS (O65FmtDesc, OS, Version, ModuleId);
}
/* */
/* */
/* */
-/* (C) 1998-2001 Ullrich von Bassewitz */
+/* (C) 1998-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
" --config name\tUse linker config file\n"
" --help\t\tHelp (this text)\n"
" --mapfile name\tCreate a map file\n"
+ " --module-id id\tSpecify a module id\n"
" --start-addr addr\tSet the default start address\n"
" --target sys\t\tSet the target system\n"
" --version\t\tPrint the linker version\n",
+static void OptModuleId (const char* Opt, const char* Arg)
+/* Specify a module id */
+{
+ unsigned long Id = CvtNumber (Opt, Arg);
+ if (Id > 0xFFFFUL) {
+ Error ("Range error in module id");
+ }
+ ModuleId = (unsigned) Id;
+}
+
+
+
static void OptStartAddr (const char* Opt, const char* Arg)
/* Set the default start address */
{
/* Program long options */
static const LongOpt OptTab[] = {
{ "--config", 1, OptConfig },
- { "--dbgfile", 1, OptDbgFile },
- { "--help", 0, OptHelp },
- { "--mapfile", 1, OptMapFile },
+ { "--dbgfile", 1, OptDbgFile },
+ { "--help", 0, OptHelp },
+ { "--mapfile", 1, OptMapFile },
+ { "--module-id", 1, OptModuleId },
{ "--start-addr", 1, OptStartAddr },
{ "--target", 1, OptTarget },
{ "--version", 0, OptVersion },