diff --git a/ld/ChangeLog b/ld/ChangeLog index affbc1e2f9..2c366a958f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,19 @@ +2001-05-02 H.J. Lu + + * ldfile.c: Include "libiberty.h". + * ldlex.l: Likewise. + + * ldmisc.c (buystring): Removed. + * ldmisc.h: Likewise. + + * ldfile.c: Replace buystring with xstrdup. + * ldlang.c: Likewise. + * ldlex.l: Likewise. + * ldmain.c: Likewise. + * ldmisc.c: Likewise. + * lexsup.c: Likewise. + * mpw-eppcmac.c: Likewise. + 2001-04-30 Andreas Jaeger * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value. diff --git a/ld/ldfile.c b/ld/ldfile.c index e8122fe752..0e4d0ec3a2 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -33,6 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldgram.h" #include "ldlex.h" #include "ldemul.h" +#include "libiberty.h" #include @@ -414,7 +415,7 @@ void ldfile_add_arch (in_name) CONST char *in_name; { - char *name = buystring (in_name); + char *name = xstrdup (in_name); search_arch_type *new = (search_arch_type *) xmalloc (sizeof (search_arch_type)); diff --git a/ld/ldlang.c b/ld/ldlang.c index 21e540eb89..a89fcf6d09 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -623,7 +623,7 @@ lang_memory_region_lookup (name) lang_memory_region_type *new = (lang_memory_region_type *) stat_alloc (sizeof (lang_memory_region_type)); - new->name = buystring (name); + new->name = xstrdup (name); new->next = (lang_memory_region_type *) NULL; *lang_memory_region_list_tail = new; @@ -1994,7 +1994,7 @@ ldlang_add_undef (name) new->next = ldlang_undef_chain_list_head; ldlang_undef_chain_list_head = new; - new->name = buystring (name); + new->name = xstrdup (name); } /* Run through the list of undefineds created above and place them diff --git a/ld/ldlex.l b/ld/ldlex.l index e0a50af347..eecb9022f1 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -45,6 +45,7 @@ This was written by steve chamberlain #include "ldfile.h" #include "ldlex.h" #include "ldmain.h" +#include "libiberty.h" /* The type of top-level parser input. yylex and yyparse (indirectly) both check this. */ @@ -147,7 +148,7 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)* "-" { RTOKEN('-');} "+" { RTOKEN('+');} -{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = buystring(yytext); return NAME; } +{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup(yytext); return NAME; } "=" { RTOKEN('='); } "$"([0-9A-Fa-f])+ { @@ -333,17 +334,17 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)* {FILENAMECHAR1}{NOCFILENAMECHAR}* { /* Filename without commas, needed to parse mri stuff */ - yylval.name = buystring(yytext); + yylval.name = xstrdup(yytext); return NAME; } {FILENAMECHAR1}{FILENAMECHAR}* { - yylval.name = buystring(yytext); + yylval.name = xstrdup(yytext); return NAME; } "-l"{FILENAMECHAR}+ { - yylval.name = buystring (yytext + 2); + yylval.name = xstrdup (yytext + 2); return LNAME; }