aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-06-30 08:11:15 +0000
committerAlan Modra <amodra@gmail.com>2005-06-30 08:11:15 +0000
commitb116d4a7eb22626b1cd82c9bf02622d41033b174 (patch)
treea55a388dec78d2eaa5907575e95e3ee2e5a0227d /bfd/elf32-ppc.c
parentb753922c0bfbe3828b1495122875de8dad473475 (diff)
downloadgdb-b116d4a7eb22626b1cd82c9bf02622d41033b174.zip
gdb-b116d4a7eb22626b1cd82c9bf02622d41033b174.tar.gz
gdb-b116d4a7eb22626b1cd82c9bf02622d41033b174.tar.bz2
* 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.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 4f1eec9..1d41f57 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -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
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
only references to the symbol are via the global offset table.
For such cases we need not do anything here; the relocations will