mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
* elflink.h (elf_link_add_object_symbols): Consistently treat
uninitialized symbols in shared objects as common symbols.
This commit is contained in:
@ -11,7 +11,8 @@ Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
|
|||||||
Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
|
Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* elflink.h (elf_link_add_object_symbols): Force ELF symbol size
|
* elflink.h (elf_link_add_object_symbols): Force ELF symbol size
|
||||||
to common symbol size.
|
to common symbol size. Consistently treat uninitialized symbols
|
||||||
|
in shared objects as common symbols.
|
||||||
|
|
||||||
Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
|
Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
@ -913,26 +913,16 @@ elf_link_add_object_symbols (abfd, info)
|
|||||||
&& definition
|
&& definition
|
||||||
&& h->root.type == bfd_link_hash_common
|
&& h->root.type == bfd_link_hash_common
|
||||||
&& (sec->flags & SEC_ALLOC) != 0
|
&& (sec->flags & SEC_ALLOC) != 0
|
||||||
&& (sec->flags & SEC_LOAD) == 0)
|
&& (sec->flags & SEC_LOAD) == 0
|
||||||
|
&& sym.st_size > 0
|
||||||
|
&& bind != STB_WEAK
|
||||||
|
&& ELF_ST_TYPE (sym.st_info) != STT_FUNC)
|
||||||
{
|
{
|
||||||
if (! ((*info->callbacks->multiple_common)
|
override = true;
|
||||||
(info, h->root.root.string,
|
sec = bfd_com_section_ptr;
|
||||||
h->root.u.c.p->section->owner, bfd_link_hash_common,
|
definition = false;
|
||||||
h->root.u.c.size, abfd, bfd_link_hash_common,
|
value = sym.st_size;
|
||||||
sym.st_size)))
|
size_change_ok = true;
|
||||||
goto error_return;
|
|
||||||
|
|
||||||
/* If the symbol in the shared library is smaller than
|
|
||||||
the one we already have, then override it to stick
|
|
||||||
with the larger symbol. Set SIZE_CHANGE_OK because
|
|
||||||
we only want to warn if requested with --warn-common. */
|
|
||||||
if (sym.st_size < h->size)
|
|
||||||
{
|
|
||||||
override = true;
|
|
||||||
sec = bfd_und_section_ptr;
|
|
||||||
definition = false;
|
|
||||||
size_change_ok = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Similarly, if we are not looking at a dynamic object, and
|
/* Similarly, if we are not looking at a dynamic object, and
|
||||||
|
Reference in New Issue
Block a user