X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-ppc.c;h=053687c0a2457bb39aae478e239f0e05d732ecb1;hb=4ac31493c8029a4594dd6dbdcee058aead5ce781;hp=839d5ff142a7fff40be1fc03b6912fb2cb2bc919;hpb=24872cb30211b650a9360edd2476a6a1dd033cbb;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 839d5ff142..053687c0a2 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1332,15 +1332,21 @@ ppc_elf_section_from_shdr (bfd *abfd, return FALSE; newsect = hdr->bfd_section; - flags = bfd_section_flags (newsect); + flags = 0; if (hdr->sh_flags & SHF_EXCLUDE) flags |= SEC_EXCLUDE; if (hdr->sh_type == SHT_ORDERED) flags |= SEC_SORT_ENTRIES; - bfd_set_section_flags (newsect, flags); - return TRUE; + if (strncmp (name, ".PPC.EMB", 8) == 0) + name += 8; + if (strncmp (name, ".sbss", 5) == 0 + || strncmp (name, ".sdata", 6) == 0) + flags |= SEC_SMALL_DATA; + + return (flags == 0 + || bfd_set_section_flags (newsect, newsect->flags | flags)); } /* Set up any other section flags and such that may be necessary. */ @@ -1394,7 +1400,7 @@ ppc_elf_modify_segment_map (bfd *abfd, for (m = elf_seg_map (abfd); m != NULL; m = m->next) { struct elf_segment_map *n; - bfd_size_type amt; + size_t amt; unsigned int j, k; unsigned int p_flags; @@ -2802,7 +2808,7 @@ update_plt_info (bfd *abfd, struct plt_entry **plist, break; if (ent == NULL) { - bfd_size_type amt = sizeof (*ent); + size_t amt = sizeof (*ent); ent = bfd_alloc (abfd, amt); if (ent == NULL) return FALSE; @@ -3796,6 +3802,9 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!ppc_elf_merge_obj_attributes (ibfd, info)) return FALSE; + if ((ibfd->flags & DYNAMIC) != 0) + return TRUE; + new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; if (!elf_flags_init (obfd))