Lines Matching defs:abfd

1928 ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
2154 ppc64_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
2172 ppc64_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
2186 abfd, (int) type);
2195 ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2203 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2214 ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2219 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2237 ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2251 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2254 octets = reloc_entry->address * bfd_octets_per_byte (abfd);
2255 insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
2293 bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
2295 return ppc64_elf_branch_reloc (abfd, reloc_entry, symbol, data,
2300 ppc64_elf_sectoff_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2308 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2317 ppc64_elf_sectoff_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2325 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2337 ppc64_elf_toc_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2347 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2360 ppc64_elf_toc_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2370 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2386 ppc64_elf_toc64_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2397 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2404 octets = reloc_entry->address * bfd_octets_per_byte (abfd);
2405 bfd_put_64 (abfd, TOCstart + TOC_BASE_OFF, (bfd_byte *) data + octets);
2410 ppc64_elf_unhandled_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2418 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2463 ppc64_elf_mkobject (bfd *abfd)
2465 if (abfd->tdata.any == NULL)
2468 abfd->tdata.any = bfd_zalloc (abfd, amt);
2469 if (abfd->tdata.any == NULL)
2472 return bfd_elf_mkobject (abfd);
2490 ppc64_elf_object_p (bfd *abfd)
2492 if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 32)
2494 Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
2499 abfd->arch_info = abfd->arch_info->next;
2500 BFD_ASSERT (abfd->arch_info->bits_per_word == 64);
2509 ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
2517 elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
2520 elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 32);
2527 return _bfd_elfcore_make_pseudosection (abfd, ".reg",
2532 ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
2537 elf_tdata (abfd)->core_program
2538 = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
2539 elf_tdata (abfd)->core_command
2540 = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
2546 ppc64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
2564 return elfcore_write_note (abfd, buf, bufsiz,
2579 bfd_put_32 (abfd, pid, data + 32);
2581 bfd_put_16 (abfd, cursig, data + 12);
2586 return elfcore_write_note (abfd, buf, bufsiz,
2674 ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
2681 sdata = bfd_zalloc (abfd, amt);
2687 return _bfd_elf_new_section_hook (abfd, sec);
2826 ppc64_elf_get_synthetic_symtab (bfd *abfd,
2837 bfd_boolean relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
2842 opd = bfd_get_section_by_name (abfd, ".opd");
2923 slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
2928 if (!(*slurp_relocs) (abfd, opd, static_syms, FALSE))
3011 if (!bfd_malloc_and_get_section (abfd, opd, &contents))
3027 ent = bfd_get_64 (abfd, contents + syms[i]->value);
3046 ent = bfd_get_64 (abfd, contents + syms[i]->value);
3051 asection *sec = abfd->sections;
3668 ppc64_elf_link_hash_table_create (bfd *abfd)
3677 if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc,
3725 ppc64_elf_init_stub_bfd (bfd *abfd, struct bfd_link_info *info)
3729 elf_elfheader (abfd)->e_ident[EI_CLASS] = ELFCLASS64;
3735 htab->stub_bfd = abfd;
3736 htab->elf.dynobj = abfd;
3939 create_got_section (bfd *abfd, struct bfd_link_info *info)
3958 got = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
3960 || !bfd_set_section_alignment (abfd, got, 3))
3963 relgot = bfd_make_section_anyway_with_flags (abfd, ".rela.got",
3966 || ! bfd_set_section_alignment (abfd, relgot, 3))
3969 ppc64_elf_tdata (abfd)->got = got;
3970 ppc64_elf_tdata (abfd)->relgot = relgot;
4179 bfd *abfd;
4184 abfd = fh->elf.root.u.undef.abfd;
4185 newsym = bfd_make_empty_symbol (abfd);
4192 if (!_bfd_generic_link_add_one_symbol (info, abfd, newsym->name,
4233 ppc64_elf_archive_symbol_lookup (bfd *abfd,
4241 h = _bfd_elf_archive_symbol_lookup (abfd, info, name);
4253 dot_name = bfd_alloc (abfd, len + 2);
4258 h = _bfd_elf_archive_symbol_lookup (abfd, info, dot_name);
4259 bfd_release (abfd, dot_name);
4380 update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
4383 struct got_entry **local_got_ents = elf_local_got_ents (abfd);
4391 local_got_ents = bfd_zalloc (abfd, size);
4394 elf_local_got_ents (abfd) = local_got_ents;
4403 && ent->owner == abfd
4409 ent = bfd_alloc (abfd, amt);
4414 ent->owner = abfd;
4428 update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend)
4438 ent = bfd_alloc (abfd, amt);
4459 ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
4488 symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
4490 sym_hashes = elf_sym_hashes (abfd);
4497 if (strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0)
4515 opd_sym_map = bfd_zalloc (abfd, amt);
4623 if (ppc64_elf_tdata (abfd)->got == NULL
4624 && !create_got_section (abfd, info))
4635 && ent->owner == abfd
4641 ent = bfd_alloc (abfd, amt);
4646 ent->owner = abfd;
4656 if (!update_local_sym_info (abfd, symtab_hdr, r_symndx,
4679 if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
4718 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
4725 if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
4745 dest = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
4757 if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h,
4798 if (!update_local_sym_info (abfd, symtab_hdr, r_symndx,
4809 ppc64_sec->u.toc.symndx = bfd_zalloc (abfd, amt);
4813 ppc64_sec->u.toc.add = bfd_zalloc (abfd, amt);
4867 s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
4953 (abfd,
4954 elf_elfheader (abfd)->e_shstrndx,
4960 || strcmp (bfd_get_section_name (abfd, sec),
4965 abfd, name);
5003 s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
5345 ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
5360 symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
5361 sym_hashes = elf_sym_hashes (abfd);
5362 local_got_ents = elf_local_got_ents (abfd);
5442 && ent->owner == abfd
5544 savegpr0 (bfd *abfd, bfd_byte *p, int r)
5546 bfd_put_32 (abfd, STD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5551 savegpr0_tail (bfd *abfd, bfd_byte *p, int r)
5553 p = savegpr0 (abfd, p, r);
5554 bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
5556 bfd_put_32 (abfd, BLR, p);
5561 restgpr0 (bfd *abfd, bfd_byte *p, int r)
5563 bfd_put_32 (abfd, LD_R0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5568 restgpr0_tail (bfd *abfd, bfd_byte *p, int r)
5570 bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
5572 p = restgpr0 (abfd, p, r);
5573 bfd_put_32 (abfd, MTLR_R0, p);
5577 p = restgpr0 (abfd, p, 30);
5578 p = restgpr0 (abfd, p, 31);
5580 bfd_put_32 (abfd, BLR, p);
5585 savegpr1 (bfd *abfd, bfd_byte *p, int r)
5587 bfd_put_32 (abfd, STD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5592 savegpr1_tail (bfd *abfd, bfd_byte *p, int r)
5594 p = savegpr1 (abfd, p, r);
5595 bfd_put_32 (abfd, BLR, p);
5600 restgpr1 (bfd *abfd, bfd_byte *p, int r)
5602 bfd_put_32 (abfd, LD_R0_0R12 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5607 restgpr1_tail (bfd *abfd, bfd_byte *p, int r)
5609 p = restgpr1 (abfd, p, r);
5610 bfd_put_32 (abfd, BLR, p);
5615 savefpr (bfd *abfd, bfd_byte *p, int r)
5617 bfd_put_32 (abfd, STFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5622 savefpr0_tail (bfd *abfd, bfd_byte *p, int r)
5624 p = savefpr (abfd, p, r);
5625 bfd_put_32 (abfd, STD_R0_0R1 + 16, p);
5627 bfd_put_32 (abfd, BLR, p);
5632 restfpr (bfd *abfd, bfd_byte *p, int r)
5634 bfd_put_32 (abfd, LFD_FR0_0R1 + (r << 21) + (1 << 16) - (32 - r) * 8, p);
5639 restfpr0_tail (bfd *abfd, bfd_byte *p, int r)
5641 bfd_put_32 (abfd, LD_R0_0R1 + 16, p);
5643 p = restfpr (abfd, p, r);
5644 bfd_put_32 (abfd, MTLR_R0, p);
5648 p = restfpr (abfd, p, 30);
5649 p = restfpr (abfd, p, 31);
5651 bfd_put_32 (abfd, BLR, p);
5656 savefpr1_tail (bfd *abfd, bfd_byte *p, int r)
5658 p = savefpr (abfd, p, r);
5659 bfd_put_32 (abfd, BLR, p);
5664 restfpr1_tail (bfd *abfd, bfd_byte *p, int r)
5666 p = restfpr (abfd, p, r);
5667 bfd_put_32 (abfd, BLR, p);
5672 savevr (bfd *abfd, bfd_byte *p, int r)
5674 bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
5676 bfd_put_32 (abfd, STVX_VR0_R12_R0 + (r << 21), p);
5681 savevr_tail (bfd *abfd, bfd_byte *p, int r)
5683 p = savevr (abfd, p, r);
5684 bfd_put_32 (abfd, BLR, p);
5689 restvr (bfd *abfd, bfd_byte *p, int r)
5691 bfd_put_32 (abfd, LI_R12_0 + (1 << 16) - (32 - r) * 16, p);
5693 bfd_put_32 (abfd, LVX_VR0_R12_R0 + (r << 21), p);
5698 restvr_tail (bfd *abfd, bfd_byte *p, int r)
5700 p = restvr (abfd, p, r);
5701 bfd_put_32 (abfd, BLR, p);