Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com)
* ldmain.c (subfile_wanted_p): If we already have a common definition of a symbol, don't necessarily pull in an object file that provides a non-common definition.
This commit is contained in:
parent
8a3efe67ae
commit
f31cb329d5
2 changed files with 14 additions and 5 deletions
|
@ -1,5 +1,9 @@
|
||||||
Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com)
|
Fri Jan 29 09:57:58 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* ldmain.c (subfile_wanted_p): If we already have a common
|
||||||
|
definition of a symbol, don't necessarily pull in an object file
|
||||||
|
that provides a non-common definition.
|
||||||
|
|
||||||
* ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
|
* ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
|
||||||
returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
|
returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
|
||||||
linker.
|
linker.
|
||||||
|
|
15
ld/ldmain.c
15
ld/ldmain.c
|
@ -958,9 +958,15 @@ subfile_wanted_p (entry)
|
||||||
if (sp->srefs_chain != (asymbol **) NULL
|
if (sp->srefs_chain != (asymbol **) NULL
|
||||||
|| sp->scoms_chain != (asymbol **) NULL)
|
|| sp->scoms_chain != (asymbol **) NULL)
|
||||||
{
|
{
|
||||||
/* This is a symbol we are looking for. It is either
|
/* This is a symbol we are looking for. It is
|
||||||
not yet defined or common. */
|
either not yet defined or common. If this is a
|
||||||
|
common symbol, then if the symbol in the object
|
||||||
|
file is common, we need to combine sizes. But if
|
||||||
|
we already have a common symbol, and the symbol
|
||||||
|
in the object file is not common, we don't want
|
||||||
|
the object file: it is providing a definition for
|
||||||
|
a symbol that we already have a definition for
|
||||||
|
(this is the else condition below). */
|
||||||
if (bfd_is_com_section (p->section))
|
if (bfd_is_com_section (p->section))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1017,8 +1023,7 @@ subfile_wanted_p (entry)
|
||||||
}
|
}
|
||||||
ASSERT (p->udata == 0);
|
ASSERT (p->udata == 0);
|
||||||
}
|
}
|
||||||
|
else if (sp->scoms_chain == (asymbol **) NULL)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (write_map)
|
if (write_map)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue