Lines Matching defs:abfd

79   bfd *abfd;
85 /* If abfd == NULL, an address that must be stored in the got. */
87 /* If abfd != NULL && symndx != -1, the addend of the relocation
90 /* If abfd != NULL && symndx == -1, the hash table entry
154 #define SCORE_ELF_SYM_SIZE(abfd) \
155 (get_elf_backend_data (abfd)->s->sizeof_sym)
170 #define ELF_SCORE_GP_OFFSET(abfd) (0x3ff0)
172 #define SCORE_ELF_GOT_MAX_SIZE(abfd) (ELF_SCORE_GP_OFFSET(abfd) + 0x3fff)
182 #define SCORE_ELF_GOT_SIZE(abfd) \
183 (get_elf_backend_data (abfd)->s->arch_size / 8)
189 #define SCORE_ELF_DYN_SIZE(abfd) \
190 (get_elf_backend_data (abfd)->s->sizeof_dyn)
193 #define SCORE_ELF_REL_SIZE(abfd) \
194 (get_elf_backend_data (abfd)->s->sizeof_rel)
197 #define SCORE_ELF_LOG_FILE_ALIGN(abfd)\
198 (get_elf_backend_data (abfd)->s->log_file_align)
219 score_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
232 score_elf_lo16_reloc (bfd *abfd,
244 hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
246 addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
254 bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
257 bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
353 score_elf_gprel15_with_gp (bfd *abfd,
374 insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
380 bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
388 gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
403 if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
410 val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
420 bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
431 score_elf_gprel15_reloc (bfd *abfd,
461 return score_elf_gprel15_with_gp (abfd, symbol, reloc_entry,
469 score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
500 return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
509 score_elf_got15_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
517 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
521 return score_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
526 score_elf_got_lo16_reloc (bfd *abfd,
538 hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
540 addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
551 bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
554 bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
901 + (!entry->abfd ? entry->d.address : entry->abfd->id);
910 return e1->abfd == e2->abfd && e1->symndx == e2->symndx
911 && (! e1->abfd ? e1->d.address == e2->d.address
954 score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded)
956 asection *sgot = bfd_get_section_by_name (abfd, ".got");
967 score_elf_got_info (bfd *abfd, asection **sgotp)
972 sgot = score_elf_got_section (abfd, TRUE);
1066 score_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
1163 score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n)
1167 s = score_elf_rel_dyn_section (abfd, FALSE);
1173 s->size += SCORE_ELF_REL_SIZE (abfd);
1176 s->size += n * SCORE_ELF_REL_SIZE (abfd);
1300 score_elf_create_got_section (bfd *abfd,
1312 s = score_elf_got_section (abfd, TRUE);
1327 s = bfd_make_section_with_flags (abfd, ".got", flags);
1329 || ! bfd_set_section_alignment (abfd, s, 4))
1337 (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
1338 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
1350 g = bfd_alloc (abfd, amt);
1383 score_elf_create_local_got_entry (bfd *abfd,
1394 entry.abfd = NULL;
1403 entry.gotidx = SCORE_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
1405 *loc = bfd_alloc (abfd, sizeof entry);
1422 bfd_put_32 (abfd, value, (sgot->contents + entry.gotidx));
1431 score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
1449 entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value, 0, NULL,
1490 e.abfd = dynobj;
1537 bfd *abfd,
1557 entry.abfd = abfd;
1568 *loc = bfd_alloc (abfd, sizeof entry);
1591 score_elf_record_local_got_symbol (bfd *abfd,
1598 entry.abfd = abfd;
1608 *loc = bfd_alloc (abfd, sizeof(entry));
1622 score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
1632 entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value,
1644 score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h)
1651 g = score_elf_got_info (abfd, &sgot);
1660 index = ((h->dynindx - global_got_dynindx + g->local_gotno) * SCORE_ELF_GOT_SIZE (abfd));
1694 if (entry->abfd != NULL && entry->symndx == -1)
1748 score_elf_add_to_rel (bfd *abfd,
1759 contents = bfd_get_32 (abfd, address);
1780 bfd_put_32 (abfd, contents, address);
1785 hi16_addend = bfd_get_32 (abfd, address - 4);
1793 bfd_put_32 (abfd, hi16_value, address - 4);
1796 bfd_put_32 (abfd, contents, address);
1805 bfd_put_32 (abfd, contents, address);
1809 contents = bfd_get_16 (abfd, address);
1813 bfd_put_16 (abfd, contents, address);
1818 contents = bfd_get_16 (abfd, address);
1821 bfd_put_16 (abfd, contents, address);
1827 bfd_put_32 (abfd, contents, address);
2176 _bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
2486 _bfd_score_elf_check_relocs (bfd *abfd,
2507 symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
2508 sym_hashes = elf_sym_hashes (abfd);
2509 extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
2511 name = bfd_get_section_name (abfd, sec);
2532 bed = get_elf_backend_data (abfd);
2549 (*_bfd_error_handler) (_("%B: Malformed reloc detected for section %s"), abfd, name);
2573 elf_hash_table (info)->dynobj = dynobj = abfd;
2581 elf_hash_table (info)->dynobj = dynobj = abfd;
2590 if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g))
2601 abfd, (unsigned long) rel->r_offset);
2608 if (! score_elf_record_global_got_symbol (h, abfd, info, g))
2618 if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g))
2665 elf_hash_table (info)->dynobj = dynobj = abfd;
2669 if (! score_elf_record_global_got_symbol (h, abfd, info, g))
2678 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
2685 if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
2714 _bfd_score_elf_add_symbol_hook (bfd *abfd,
2725 if (sym->st_size > elf_gp_size (abfd))
2729 *secp = bfd_make_section_old_way (abfd, ".scommon");
2739 _bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym)
2747 if (asym->value > elf_gp_size (abfd))
2787 _bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
2791 if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
3134 _bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
3145 s = bfd_get_section_by_name (abfd, ".dynamic");
3148 if (!bfd_set_section_flags (abfd, s, flags))
3153 if (!score_elf_create_got_section (abfd, info, FALSE))
3160 if (bfd_get_section_by_name (abfd, SCORE_ELF_STUB_SECTION_NAME) == NULL)
3162 s = bfd_make_section_with_flags (abfd, SCORE_ELF_STUB_SECTION_NAME,
3165 || !bfd_set_section_alignment (abfd, s, 2))
3177 (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr,
3178 (bfd_vma) 0, (const char *)NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
3433 _bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
3439 name = bfd_get_section_name (abfd, sec);
3459 _bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr)
3463 const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
3546 _bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
3554 o = bfd_get_section_by_name (abfd, ".pdr");
3563 cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory);
3631 _bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
3643 elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
3646 elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
3656 return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size, note->descpos + offset);
3660 _bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
3668 elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
3669 elf_tdata (abfd)->core_command = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
3677 char *command = elf_tdata (abfd)->core_command;
3691 elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
3703 elf32_score_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
3722 elf32_score_link_hash_table_create (bfd *abfd)
3731 if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, score_elf_link_hash_newfunc,
3742 elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
3746 BFD_ASSERT (abfd != NULL && ptr != NULL);
3749 _bfd_elf_print_private_bfd_data (abfd, ptr);
3752 fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
3753 if (elf_elfheader (abfd)->e_flags & EF_SCORE_PIC)
3757 if (elf_elfheader (abfd)->e_flags & EF_SCORE_FIXDEP)
3810 elf32_score_new_section_hook (bfd *abfd, asection *sec)
3815 sdata = bfd_zalloc (abfd, amt);
3820 return _bfd_elf_new_section_hook (abfd, sec);