mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
2000-05-23 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_relocate_section): Don't allow the undefined symbol with the non-default visibility attributes. * elf-hppa.h (elf_hppa_relocate_section): Likewise. * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
This commit is contained in:
@ -1,3 +1,19 @@
|
|||||||
|
2000-05-23 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_relocate_section): Don't allow the
|
||||||
|
undefined symbol with the non-default visibility attributes.
|
||||||
|
* elf-hppa.h (elf_hppa_relocate_section): Likewise.
|
||||||
|
* elf32-arm.h (elf32_arm_relocate_section): Likewise.
|
||||||
|
* elf32-i370.c (i370_elf_relocate_section): Likewise.
|
||||||
|
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
|
||||||
|
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
|
||||||
|
* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
|
||||||
|
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
|
||||||
|
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
|
||||||
|
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
|
||||||
|
* elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
|
||||||
|
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
|
||||||
|
|
||||||
2000-05-22 Richard Henderson <rth@cygnus.com>
|
2000-05-22 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
* elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
|
* elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
|
||||||
|
@ -1341,7 +1341,8 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
/* Allow undefined symbols in shared libraries. */
|
/* Allow undefined symbols in shared libraries. */
|
||||||
else if (info->shared && !info->no_undefined)
|
else if (info->shared && !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
{
|
{
|
||||||
if (info->symbolic)
|
if (info->symbolic)
|
||||||
(*info->callbacks->undefined_symbol)
|
(*info->callbacks->undefined_symbol)
|
||||||
|
@ -1838,14 +1838,17 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!((*info->callbacks->undefined_symbol)
|
if (!((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -1413,7 +1413,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared)
|
else if (info->shared
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1390,14 +1390,17 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! ((*info->callbacks->undefined_symbol)
|
if (! ((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -1479,14 +1479,17 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(info->callbacks->undefined_symbol
|
if (!(info->callbacks->undefined_symbol
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,8 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared)
|
else if (info->shared
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -5917,7 +5917,8 @@ mips_elf_calculate_relocation (abfd,
|
|||||||
and check to see if they exist by looking at their
|
and check to see if they exist by looking at their
|
||||||
addresses. */
|
addresses. */
|
||||||
symbol = 0;
|
symbol = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic && !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
symbol = 0;
|
symbol = 0;
|
||||||
else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
|
else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
|
||||||
{
|
{
|
||||||
@ -5935,7 +5936,8 @@ mips_elf_calculate_relocation (abfd,
|
|||||||
if (! ((*info->callbacks->undefined_symbol)
|
if (! ((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.root.string, input_bfd,
|
(info, h->root.root.root.string, input_bfd,
|
||||||
input_section, relocation->r_offset,
|
input_section, relocation->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return bfd_reloc_undefined;
|
return bfd_reloc_undefined;
|
||||||
symbol = 0;
|
symbol = 0;
|
||||||
}
|
}
|
||||||
|
@ -3091,7 +3091,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3101,7 +3103,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
input_section,
|
input_section,
|
||||||
rel->r_offset,
|
rel->r_offset,
|
||||||
(!info->shared
|
(!info->shared
|
||||||
|| info->no_undefined)))
|
|| info->no_undefined
|
||||||
|
ELF_ST_VISIBILITY (h->other))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -1213,14 +1213,17 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! ((*info->callbacks->undefined_symbol)
|
if (! ((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -3475,14 +3475,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.root.type == bfd_link_hash_undefweak)
|
else if (h->root.root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!((*info->callbacks->undefined_symbol)
|
if (!((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.root.string, input_bfd,
|
(info, h->root.root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
@ -3258,14 +3258,17 @@ elf64_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
undef_weak_ref = true;
|
undef_weak_ref = true;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! ((*info->callbacks->undefined_symbol)
|
if (! ((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
ret_val = false;
|
ret_val = false;
|
||||||
continue;
|
continue;
|
||||||
|
@ -2049,14 +2049,17 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
}
|
}
|
||||||
else if (h->root.type == bfd_link_hash_undefweak)
|
else if (h->root.type == bfd_link_hash_undefweak)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
else if (info->shared && !info->symbolic
|
||||||
|
&& !info->no_undefined
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! ((*info->callbacks->undefined_symbol)
|
if (! ((*info->callbacks->undefined_symbol)
|
||||||
(info, h->root.root.string, input_bfd,
|
(info, h->root.root.string, input_bfd,
|
||||||
input_section, rel->r_offset,
|
input_section, rel->r_offset,
|
||||||
(!info->shared || info->no_undefined))))
|
(!info->shared || info->no_undefined
|
||||||
|
|| ELF_ST_VISIBILITY (h->other)))))
|
||||||
return false;
|
return false;
|
||||||
relocation = 0;
|
relocation = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user