* ldmisc.c (multiple_warn): Remove; no longer used.
* ldmisc.h (multiple_warn): Don't declare.
This commit is contained in:
parent
1896790ef9
commit
8bff41c1b7
2 changed files with 14 additions and 61 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Sep 14 12:48:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
|
* ldmisc.c (multiple_warn): Remove; no longer used.
|
||||||
|
* ldmisc.h (multiple_warn): Don't declare.
|
||||||
|
|
||||||
Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
|
Tue Sep 13 20:47:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
|
||||||
|
|
||||||
* ldlang.c (print_output_section_statement): Print all lines
|
* ldlang.c (print_output_section_statement): Print all lines
|
||||||
|
|
70
ld/ldmisc.c
70
ld/ldmisc.c
|
@ -28,6 +28,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "ldmisc.h"
|
#include "ldmisc.h"
|
||||||
#include "ldexp.h"
|
#include "ldexp.h"
|
||||||
#include "ldlang.h"
|
#include "ldlang.h"
|
||||||
|
#include "ldgram.h"
|
||||||
#include "ldlex.h"
|
#include "ldlex.h"
|
||||||
#include "ldmain.h"
|
#include "ldmain.h"
|
||||||
#include "ldfile.h"
|
#include "ldfile.h"
|
||||||
|
@ -188,10 +189,7 @@ vfinfo(fp, fmt, arg)
|
||||||
case 'S':
|
case 'S':
|
||||||
/* print script file and linenumber */
|
/* print script file and linenumber */
|
||||||
{
|
{
|
||||||
if (ldfile_input_filename == (char *)NULL) {
|
if (ldfile_input_filename) {
|
||||||
fprintf(fp,"command line");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fprintf(fp,"%s:%u", ldfile_input_filename, lineno );
|
fprintf(fp,"%s:%u", ldfile_input_filename, lineno );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,12 +231,16 @@ vfinfo(fp, fmt, arg)
|
||||||
asymbols = entry->asymbols;
|
asymbols = entry->asymbols;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int symsize;
|
long symsize;
|
||||||
unsigned int symbol_count;
|
long symbol_count;
|
||||||
|
|
||||||
symsize = get_symtab_upper_bound (abfd);
|
symsize = bfd_get_symtab_upper_bound (abfd);
|
||||||
|
if (symsize < 0)
|
||||||
|
einfo ("%B%F: could not read symbols", abfd);
|
||||||
asymbols = (asymbol **) xmalloc (symsize);
|
asymbols = (asymbol **) xmalloc (symsize);
|
||||||
symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
|
symbol_count = bfd_canonicalize_symtab (abfd, asymbols);
|
||||||
|
if (symbol_count < 0)
|
||||||
|
einfo ("%B%F: could not read symbols", abfd);
|
||||||
if (entry != (lang_input_statement_type *) NULL)
|
if (entry != (lang_input_statement_type *) NULL)
|
||||||
{
|
{
|
||||||
entry->asymbols = asymbols;
|
entry->asymbols = asymbols;
|
||||||
|
@ -312,35 +314,6 @@ void einfo(va_alist)
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Warn about a symbol NEWSYM being multiply defined with another symbol OLDSYM.
|
|
||||||
MESSAGE1 and MESSAGE2 should look something like:
|
|
||||||
"%C: warning: multiple commons of `%s'\n"
|
|
||||||
"%C: warning: previous common here\n" */
|
|
||||||
|
|
||||||
void
|
|
||||||
multiple_warn (message1, newsym, message2, oldsym)
|
|
||||||
char *message1;
|
|
||||||
asymbol *newsym;
|
|
||||||
char *message2;
|
|
||||||
asymbol *oldsym;
|
|
||||||
{
|
|
||||||
lang_input_statement_type *inp_stat;
|
|
||||||
asymbol **stat_symbols;
|
|
||||||
|
|
||||||
inp_stat = (lang_input_statement_type *) bfd_asymbol_bfd (newsym)->usrdata;
|
|
||||||
stat_symbols = inp_stat ? inp_stat->asymbols : 0;
|
|
||||||
|
|
||||||
einfo (message1,
|
|
||||||
bfd_asymbol_bfd (newsym), newsym->section, stat_symbols, newsym->value,
|
|
||||||
demangle (newsym->name, 1));
|
|
||||||
|
|
||||||
inp_stat = (lang_input_statement_type *) bfd_asymbol_bfd (oldsym)->usrdata;
|
|
||||||
stat_symbols = inp_stat ? inp_stat->asymbols : 0;
|
|
||||||
|
|
||||||
einfo (message2,
|
|
||||||
bfd_asymbol_bfd (oldsym), oldsym->section, stat_symbols, oldsym->value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
info_assert(file, line)
|
info_assert(file, line)
|
||||||
char *file;
|
char *file;
|
||||||
|
@ -349,31 +322,6 @@ info_assert(file, line)
|
||||||
einfo("%F%P: internal error %s %d\n", file,line);
|
einfo("%F%P: internal error %s %d\n", file,line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a newly-allocated string
|
|
||||||
whose contents concatenate those of S1, S2, S3. */
|
|
||||||
|
|
||||||
char *
|
|
||||||
concat (s1, s2, s3)
|
|
||||||
CONST char *s1;
|
|
||||||
CONST char *s2;
|
|
||||||
CONST char *s3;
|
|
||||||
{
|
|
||||||
size_t len1 = strlen (s1);
|
|
||||||
size_t len2 = strlen (s2);
|
|
||||||
size_t len3 = strlen (s3);
|
|
||||||
char *result = xmalloc (len1 + len2 + len3 + 1);
|
|
||||||
|
|
||||||
if (len1 != 0)
|
|
||||||
memcpy(result, s1, len1);
|
|
||||||
if (len2 != 0)
|
|
||||||
memcpy(result+len1, s2, len2);
|
|
||||||
if (len3 != 0)
|
|
||||||
memcpy(result+len1+len2, s2, len3);
|
|
||||||
*(result + len1 + len2 + len3) = 0;
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
buystring (x)
|
buystring (x)
|
||||||
CONST char *CONST x;
|
CONST char *CONST x;
|
||||||
|
|
Loading…
Reference in a new issue