There's no longer a need to link in the startup file, it's done my magic
instead. git-svn-id: svn://svn.cc65.org/cc65/trunk@3991 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -118,8 +118,7 @@ static int Module = 0;
|
|||||||
/* Extension used for a module */
|
/* Extension used for a module */
|
||||||
#define MODULE_EXT ".o65"
|
#define MODULE_EXT ".o65"
|
||||||
|
|
||||||
/* Name of the crt0 object file and the runtime library */
|
/* Name of the target specific runtime library */
|
||||||
static char* TargetCRT0 = 0;
|
|
||||||
static char* TargetLib = 0;
|
static char* TargetLib = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -328,18 +327,13 @@ static void CmdPrint (CmdDesc* Cmd, FILE* F)
|
|||||||
static void SetTargetFiles (void)
|
static void SetTargetFiles (void)
|
||||||
/* Set the target system files */
|
/* Set the target system files */
|
||||||
{
|
{
|
||||||
/* Determine the names of the default startup and library file */
|
/* Determine the names of the target specific library file */
|
||||||
if (Target != TGT_NONE) {
|
if (Target != TGT_NONE) {
|
||||||
|
|
||||||
/* Get a pointer to the system name and its length */
|
/* Get a pointer to the system name and its length */
|
||||||
const char* TargetName = TargetNames [Target];
|
const char* TargetName = TargetNames [Target];
|
||||||
unsigned TargetNameLen = strlen (TargetName);
|
unsigned TargetNameLen = strlen (TargetName);
|
||||||
|
|
||||||
/* Set the startup file */
|
|
||||||
TargetCRT0 = xmalloc (TargetNameLen + 2 + 1);
|
|
||||||
memcpy (TargetCRT0, TargetName, TargetNameLen);
|
|
||||||
strcpy (TargetCRT0 + TargetNameLen, ".o");
|
|
||||||
|
|
||||||
/* Set the library file */
|
/* Set the library file */
|
||||||
TargetLib = xmalloc (TargetNameLen + 4 + 1);
|
TargetLib = xmalloc (TargetNameLen + 4 + 1);
|
||||||
memcpy (TargetLib, TargetName, TargetNameLen);
|
memcpy (TargetLib, TargetName, TargetNameLen);
|
||||||
@@ -422,13 +416,6 @@ static void Link (void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have a startup file and if we are not linking a module, add its
|
|
||||||
* name as a parameter
|
|
||||||
*/
|
|
||||||
if (TargetCRT0 && !Module) {
|
|
||||||
CmdAddArg (&LD65, TargetCRT0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add all object files as parameters */
|
/* Add all object files as parameters */
|
||||||
for (I = 0; I < LD65.FileCount; ++I) {
|
for (I = 0; I < LD65.FileCount; ++I) {
|
||||||
CmdAddArg (&LD65, LD65.Files [I]);
|
CmdAddArg (&LD65, LD65.Files [I]);
|
||||||
|
|||||||
Reference in New Issue
Block a user