|
|
@ -647,11 +647,16 @@ def_file_add_directive (def_file *my_def, const char *param, int len) |
|
|
|
|
|
|
|
|
static void |
|
|
static void |
|
|
def_image_name (const char *name, int base, int is_dll) |
|
|
def_image_name (const char *name, int base, int is_dll) |
|
|
|
|
|
{ |
|
|
|
|
|
/* If a LIBRARY or NAME statement is specified without a name, there is nothing |
|
|
|
|
|
to do here. We retain the output filename specified on command line. */ |
|
|
|
|
|
if (*name) |
|
|
{ |
|
|
{ |
|
|
const char* image_name = lbasename (name); |
|
|
const char* image_name = lbasename (name); |
|
|
if (image_name != name) |
|
|
if (image_name != name) |
|
|
einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n", |
|
|
einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n", |
|
|
def_filename, linenumber, is_dll ? "LIBRARY" : "NAME", name); |
|
|
def_filename, linenumber, is_dll ? "LIBRARY" : "NAME", |
|
|
|
|
|
name); |
|
|
if (def->name) |
|
|
if (def->name) |
|
|
free (def->name); |
|
|
free (def->name); |
|
|
/* Append the default suffix, if none specified. */ |
|
|
/* Append the default suffix, if none specified. */ |
|
|
@ -664,6 +669,9 @@ def_image_name (const char *name, int base, int is_dll) |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
def->name = xstrdup (image_name); |
|
|
def->name = xstrdup (image_name); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Honor a BASE address statement, even if LIBRARY string is empty. */ |
|
|
def->base_address = base; |
|
|
def->base_address = base; |
|
|
def->is_dll = is_dll; |
|
|
def->is_dll = is_dll; |
|
|
} |
|
|
} |
|
|
|