mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 08:24:05 +08:00
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
_SDA_BASE_ and _SDA2_BASE_ symbols. * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define sym if not def_regular. (_bfd_elf_provide_section_bound_symbols): Similarly.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2005-06-30 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
|
||||||
|
_SDA_BASE_ and _SDA2_BASE_ symbols.
|
||||||
|
* elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
|
||||||
|
sym if not def_regular.
|
||||||
|
(_bfd_elf_provide_section_bound_symbols): Similarly.
|
||||||
|
|
||||||
2005-06-30 Ben Elliston <bje@gnu.org>
|
2005-06-30 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
* config.bfd: Mark as obsolete:
|
* config.bfd: Mark as obsolete:
|
||||||
|
@ -3945,6 +3945,24 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
|
|||||||
/* This is a reference to a symbol defined by a dynamic object which
|
/* This is a reference to a symbol defined by a dynamic object which
|
||||||
is not a function. */
|
is not a function. */
|
||||||
|
|
||||||
|
/* First, a fudge for old shared libs that export some symbols they
|
||||||
|
should not. */
|
||||||
|
if (!h->def_regular
|
||||||
|
&& (strcmp (h->root.root.string, "_SDA_BASE_") == 0
|
||||||
|
|| strcmp (h->root.root.string, "_SDA2_BASE_") == 0))
|
||||||
|
{
|
||||||
|
/* These symbols will be defined later, as if they were defined in
|
||||||
|
a linker script. We don't want to use a definition in a shared
|
||||||
|
object. */
|
||||||
|
const struct elf_backend_data *bed;
|
||||||
|
|
||||||
|
bed = get_elf_backend_data (htab->elf.dynobj);
|
||||||
|
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
|
||||||
|
h->root.type = bfd_link_hash_undefined;
|
||||||
|
h->root.u.undef.abfd = htab->elf.dynobj;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* If we are creating a shared library, we must presume that the
|
/* If we are creating a shared library, we must presume that the
|
||||||
only references to the symbol are via the global offset table.
|
only references to the symbol are via the global offset table.
|
||||||
For such cases we need not do anything here; the relocations will
|
For such cases we need not do anything here; the relocations will
|
||||||
|
@ -9836,8 +9836,9 @@ bfd_elf_set_symbol (struct elf_link_hash_entry *h, bfd_vma val,
|
|||||||
h->forced_local = 1;
|
h->forced_local = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set NAME to VAL if the symbol exists and is undefined. If val is NULL
|
/* Set NAME to VAL if the symbol exists and is not defined in a regular
|
||||||
it is an absolute symbol, otherwise it is relative to that section. */
|
object file. If S is NULL it is an absolute symbol, otherwise it is
|
||||||
|
relative to that section. */
|
||||||
|
|
||||||
void
|
void
|
||||||
_bfd_elf_provide_symbol (struct bfd_link_info *info, const char *name,
|
_bfd_elf_provide_symbol (struct bfd_link_info *info, const char *name,
|
||||||
@ -9847,13 +9848,12 @@ _bfd_elf_provide_symbol (struct bfd_link_info *info, const char *name,
|
|||||||
|
|
||||||
h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE,
|
h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE,
|
||||||
FALSE);
|
FALSE);
|
||||||
if (h != NULL && (h->root.type == bfd_link_hash_undefined
|
if (h != NULL && !h->def_regular)
|
||||||
|| h->root.type == bfd_link_hash_undefweak))
|
|
||||||
bfd_elf_set_symbol (h, val, s);
|
bfd_elf_set_symbol (h, val, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set START and END to boundaries of SEC if they exist and are
|
/* Set START and END to boundaries of SEC if they exist and are not
|
||||||
undefined. */
|
defined in regular object files. */
|
||||||
|
|
||||||
void
|
void
|
||||||
_bfd_elf_provide_section_bound_symbols (struct bfd_link_info *info,
|
_bfd_elf_provide_section_bound_symbols (struct bfd_link_info *info,
|
||||||
@ -9868,15 +9868,11 @@ _bfd_elf_provide_section_bound_symbols (struct bfd_link_info *info,
|
|||||||
/* Check if we need them or not first. */
|
/* Check if we need them or not first. */
|
||||||
hs = elf_link_hash_lookup (elf_hash_table (info), start, FALSE,
|
hs = elf_link_hash_lookup (elf_hash_table (info), start, FALSE,
|
||||||
FALSE, FALSE);
|
FALSE, FALSE);
|
||||||
do_start = (hs != NULL
|
do_start = hs != NULL && !hs->def_regular;
|
||||||
&& (hs->root.type == bfd_link_hash_undefined
|
|
||||||
|| hs->root.type == bfd_link_hash_undefweak));
|
|
||||||
|
|
||||||
he = elf_link_hash_lookup (elf_hash_table (info), end, FALSE,
|
he = elf_link_hash_lookup (elf_hash_table (info), end, FALSE,
|
||||||
FALSE, FALSE);
|
FALSE, FALSE);
|
||||||
do_end = (he != NULL
|
do_end = he != NULL && !he->def_regular;
|
||||||
&& (he->root.type == bfd_link_hash_undefined
|
|
||||||
|| he->root.type == bfd_link_hash_undefweak));
|
|
||||||
|
|
||||||
if (!do_start && !do_end)
|
if (!do_start && !do_end)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user