aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.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/elflink.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/elflink.c')
-rw-r--r--bfd/elflink.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 8870857..6177f53 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -9836,8 +9836,9 @@ bfd_elf_set_symbol (struct elf_link_hash_entry *h, bfd_vma val,
h->forced_local = 1;
}
-/* Set NAME to VAL if the symbol exists and is undefined. If val is NULL
- it is an absolute symbol, otherwise it is relative to that section. */
+/* Set NAME to VAL if the symbol exists and is not defined in a regular
+ object file. If S is NULL it is an absolute symbol, otherwise it is
+ relative to that section. */
void
_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,
FALSE);
- if (h != NULL && (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak))
+ if (h != NULL && !h->def_regular)
bfd_elf_set_symbol (h, val, s);
}
-/* Set START and END to boundaries of SEC if they exist and are
- undefined. */
+/* Set START and END to boundaries of SEC if they exist and are not
+ defined in regular object files. */
void
_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. */
hs = elf_link_hash_lookup (elf_hash_table (info), start, FALSE,
FALSE, FALSE);
- do_start = (hs != NULL
- && (hs->root.type == bfd_link_hash_undefined
- || hs->root.type == bfd_link_hash_undefweak));
+ do_start = hs != NULL && !hs->def_regular;
he = elf_link_hash_lookup (elf_hash_table (info), end, FALSE,
FALSE, FALSE);
- do_end = (he != NULL
- && (he->root.type == bfd_link_hash_undefined
- || he->root.type == bfd_link_hash_undefweak));
+ do_end = he != NULL && !he->def_regular;
if (!do_start && !do_end)
return;