fatal if -pie.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
(ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
on undefined symbols if -pie.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
+2003-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
+ fatal if -pie.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
+ on undefined symbols if -pie.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+
2003-08-11 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
}
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, (!info->shared
+ rel->r_offset, (info->executable
|| info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
+ sym_sec->output_offset);
}
}
- else if (info->shared
+ else if (!info->executable
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
continue;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
relocation = 0;
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared
+ else if (! info->executable
&& ! info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
relocation = 0;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
}
if (!((*info->callbacks->undefined_symbol)
(info, h->root.root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->root.other)))))
return FALSE;
continue;
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, (!info->shared
+ rel->r_offset, (info->executable
|| info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
relocation = 0;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
relocation = 0;
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined
+ (info->executable || info->no_undefined
|| ELF_ST_VISIBILITY (h->other)))))
return FALSE;
continue;