From: H.J. Lu Date: Wed, 2 May 2001 16:42:55 +0000 (+0000) Subject: 2001-05-02 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1b2b2dcb9990cc1b113ce35fe9ebe120d34b1c3;p=binutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index affbc1e2f92..2c366a958f1 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 e8122fe7528..0e4d0ec3a2e 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 21e540eb891..a89fcf6d091 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 e0a50af3474..eecb9022f1a 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; }