/* This file is is generated by a shell script. DO NOT EDIT! */
/* Emulate the original gld for the given ${EMULATION_NAME}
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
Extended for the MSP430 by Nick Clifton nickc@redhat.com
char * lower_name;
char * upper_name;
char * name;
+ char * buf = NULL;
lang_output_section_statement_type * lower;
lang_output_section_statement_type * upper;
lang_output_section_statement_type * os;
only use the part of the name before the second dot. */
if (strchr (secname + 1, '.') != NULL)
{
- name = ACONCAT ((secname, NULL));
+ buf = name = xstrdup (secname);
* strchr (name + 1, '.') = 0;
}
else
name = (char *) secname;
- lower_name = ACONCAT ((".lower", name, NULL));
- upper_name = ACONCAT ((".upper", name, NULL));
+ lower_name = concat (".lower", name, NULL);
+ upper_name = concat (".upper", name, NULL);
/* Find the corresponding lower and upper sections. */
lower = lang_output_section_find (lower_name);
if (upper == NULL)
{
einfo ("%P: error: no section named %s or %s in linker script\n", lower_name, upper_name);
- return NULL;
+ goto end;
}
}
else if (upper == NULL)
}
lang_add_section (& os->children, s, NULL, os);
+ end:
+ free (upper_name);
+ free (lower_name);
+ if (buf)
+ free (buf);
return os;
}
EOF