2002-03-13 Alan Modra <amodra@bigpond.net.au>
+ * elflink.h: Formatting fixes.
+ (elf_link_output_extsym): Merge undefined and undef weak cases.
+
* elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
when word size of input matches output word size.
return false;
case bfd_link_hash_undefined:
- input_sec = bfd_und_section_ptr;
- sym.st_shndx = SHN_UNDEF;
- break;
-
case bfd_link_hash_undefweak:
input_sec = bfd_und_section_ptr;
sym.st_shndx = SHN_UNDEF;
}
stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab");
- if ((! stab || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
+ if ((! stab
+ || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
&& ! eh
&& (strip || ! bed->elf_backend_discard_info))
continue;
cookie.relend = NULL;
if (eh->reloc_count)
cookie.rels = (NAME(_bfd_elf,link_read_relocs)
- (abfd, eh, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
+ (abfd, eh, (PTR) NULL, (Elf_Internal_Rela *) NULL,
info->keep_memory));
if (cookie.rels)
{
free (freesyms);
}
- if (ehdr
- && _bfd_elf_discard_section_eh_frame_hdr (output_bfd,
- info, ehdr))
+ if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr))
ret = true;
return ret;
}
elf_section_ignore_discarded_relocs (sec)
asection *sec;
{
+ struct elf_backend_data *bed;
+
switch (elf_section_data (sec)->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
default:
break;
}
- if ((get_elf_backend_data (sec->owner)->elf_backend_ignore_discarded_relocs
- != NULL)
- && (*get_elf_backend_data (sec->owner)
- ->elf_backend_ignore_discarded_relocs) (sec))
+
+ bed = get_elf_backend_data (sec->owner);
+ if (bed->elf_backend_ignore_discarded_relocs != NULL
+ && (*bed->elf_backend_ignore_discarded_relocs) (sec))
return true;
return false;