diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2004-03-20 23:16:43 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2004-03-20 23:16:43 +0000 |
commit | 59c2e50f2900f1256ee5b00551afd084a68a900b (patch) | |
tree | 7cd2a494803eed6d5a036bb37695fb3dee093066 /bfd/elf-hppa.h | |
parent | 023aaf9519725736042c2b233622ddfac1745596 (diff) | |
download | gdb-59c2e50f2900f1256ee5b00551afd084a68a900b.zip gdb-59c2e50f2900f1256ee5b00551afd084a68a900b.tar.gz gdb-59c2e50f2900f1256ee5b00551afd084a68a900b.tar.bz2 |
bfd/
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
unresolved symbols in objects aren't allowed.
* elf-hppa.h (elf_hppa_relocate_section): Properly handle
unresolved symbols.
(elf_hppa_remark_useless_dynamic_symbols): Likewise.
(elf_hppa_unmark_useless_dynamic_symbols):
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
(elf32_hppa_relocate_section): Likewise.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
* elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
* elf-m10200.c (mn10200_elf_relocate_section): Use
RELOC_FOR_GLOBAL_SYMBOL.
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
* elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relocate_section): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
include/
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (bfd_link_info): Correct comments for the
unresolved_syms_in_objects field.
ld/
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* lexsup.c (parse_args): Don't set unresolved_syms_in_objects
or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r-- | bfd/elf-hppa.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index 5efd808..f5aba51 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -1118,8 +1118,7 @@ elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, Ultimately we should have better controls over the generic ELF BFD linker code. */ if (! info->relocatable - && ! (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE) + && info->unresolved_syms_in_shared_libs != RM_IGNORE && h->root.type == bfd_link_hash_undefined && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) @@ -1153,8 +1152,7 @@ elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, Ultimately we should have better controls over the generic ELF BFD linker code. */ if (! info->relocatable - && ! (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE) + && info->unresolved_syms_in_shared_libs != RM_IGNORE && h->root.type == bfd_link_hash_undefined && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0 @@ -1420,16 +1418,9 @@ elf_hppa_relocate_section (bfd *output_bfd, else relocation = 0; } - /* Allow undefined symbols in shared libraries. */ - else if (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) { - if (info->symbolic) - (*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, FALSE); - /* If this symbol has an entry in the PA64 dynamic hash table, then get it. */ dyn_name = get_dyn_name (input_bfd, h, rel, @@ -1471,7 +1462,9 @@ elf_hppa_relocate_section (bfd *output_bfd, { if (!((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (h->other))))) return FALSE; break; } |