Lines Matching refs:r_rel
4926 r_reloc_is_const (const r_reloc *r_rel) in r_reloc_is_const() argument
4928 return (r_rel->abfd == NULL); in r_reloc_is_const()
4933 r_reloc_get_target_offset (const r_reloc *r_rel) in r_reloc_get_target_offset() argument
4938 BFD_ASSERT (!r_reloc_is_const (r_rel)); in r_reloc_get_target_offset()
4939 r_symndx = ELF32_R_SYM (r_rel->rela.r_info); in r_reloc_get_target_offset()
4940 target_offset = get_elf_r_symndx_offset (r_rel->abfd, r_symndx); in r_reloc_get_target_offset()
4941 return (target_offset + r_rel->rela.r_addend); in r_reloc_get_target_offset()
4946 r_reloc_get_hash_entry (const r_reloc *r_rel) in r_reloc_get_hash_entry() argument
4948 unsigned long r_symndx = ELF32_R_SYM (r_rel->rela.r_info); in r_reloc_get_hash_entry()
4949 return get_elf_r_symndx_hash_entry (r_rel->abfd, r_symndx); in r_reloc_get_hash_entry()
4954 r_reloc_get_section (const r_reloc *r_rel) in r_reloc_get_section() argument
4956 unsigned long r_symndx = ELF32_R_SYM (r_rel->rela.r_info); in r_reloc_get_section()
4957 return get_elf_r_symndx_section (r_rel->abfd, r_symndx); in r_reloc_get_section()
4962 r_reloc_is_defined (const r_reloc *r_rel) in r_reloc_is_defined() argument
4965 if (r_rel == NULL) in r_reloc_is_defined()
4968 sec = r_reloc_get_section (r_rel); in r_reloc_is_defined()
4978 r_reloc_init (r_reloc *r_rel, in r_reloc_init() argument
4989 r_rel->rela = *irel; in r_reloc_init()
4990 r_rel->abfd = abfd; in r_reloc_init()
4991 r_rel->target_offset = r_reloc_get_target_offset (r_rel); in r_reloc_init()
4992 r_rel->virtual_offset = 0; in r_reloc_init()
4993 r_type = ELF32_R_TYPE (r_rel->rela.r_info); in r_reloc_init()
4998 BFD_ASSERT (r_rel->rela.r_offset < content_length); in r_reloc_init()
5000 inplace_val = bfd_get_32 (abfd, &contents[r_rel->rela.r_offset]); in r_reloc_init()
5001 r_rel->target_offset += inplace_val; in r_reloc_init()
5005 memset (r_rel, 0, sizeof (r_reloc)); in r_reloc_init()
5012 print_r_reloc (FILE *fp, const r_reloc *r_rel) in print_r_reloc() argument
5014 if (r_reloc_is_defined (r_rel)) in print_r_reloc()
5016 asection *sec = r_reloc_get_section (r_rel); in print_r_reloc()
5019 else if (r_reloc_get_hash_entry (r_rel)) in print_r_reloc()
5020 fprintf (fp, " %s + ", r_reloc_get_hash_entry (r_rel)->root.root.string); in print_r_reloc()
5024 fprintf_vma (fp, r_rel->target_offset); in print_r_reloc()
5025 if (r_rel->virtual_offset) in print_r_reloc()
5028 fprintf_vma (fp, r_rel->virtual_offset); in print_r_reloc()
5059 r_reloc r_rel; member
5070 const r_reloc *r_rel, in init_source_reloc() argument
5076 reloc->r_rel = *r_rel; in init_source_reloc()
5099 && src_relocs[i].r_rel.rela.r_offset == irel->r_offset in find_source_reloc()
5100 && (ELF32_R_TYPE (src_relocs[i].r_rel.rela.r_info) in find_source_reloc()
5115 if (a->r_rel.target_offset != b->r_rel.target_offset) in source_reloc_compare()
5116 return (a->r_rel.target_offset - b->r_rel.target_offset); in source_reloc_compare()
5127 return internal_reloc_compare (&a->r_rel.rela, &b->r_rel.rela); in source_reloc_compare()
5150 r_reloc r_rel; member
5174 const r_reloc *r_rel, in init_literal_value() argument
5178 lit->r_rel = *r_rel; in init_literal_value()
5191 if (r_reloc_is_const (&src1->r_rel) != r_reloc_is_const (&src2->r_rel)) in literal_value_equal()
5194 if (r_reloc_is_const (&src1->r_rel)) in literal_value_equal()
5197 if (ELF32_R_TYPE (src1->r_rel.rela.r_info) in literal_value_equal()
5198 != ELF32_R_TYPE (src2->r_rel.rela.r_info)) in literal_value_equal()
5201 if (src1->r_rel.target_offset != src2->r_rel.target_offset) in literal_value_equal()
5204 if (src1->r_rel.virtual_offset != src2->r_rel.virtual_offset) in literal_value_equal()
5212 h1 = r_reloc_get_hash_entry (&src1->r_rel); in literal_value_equal()
5213 h2 = r_reloc_get_hash_entry (&src2->r_rel); in literal_value_equal()
5214 if (r_reloc_is_defined (&src1->r_rel) in literal_value_equal()
5219 if (r_reloc_get_section (&src1->r_rel) in literal_value_equal()
5220 != r_reloc_get_section (&src2->r_rel)) in literal_value_equal()
5283 if (!r_reloc_is_const (&src->r_rel)) in literal_value_hash()
5288 hash_val += hash_bfd_vma (src->r_rel.target_offset); in literal_value_hash()
5289 hash_val += hash_bfd_vma (src->r_rel.virtual_offset); in literal_value_hash()
5292 if (r_reloc_is_defined (&src->r_rel)) in literal_value_hash()
5293 sec_or_hash = r_reloc_get_section (&src->r_rel); in literal_value_hash()
5295 sec_or_hash = r_reloc_get_hash_entry (&src->r_rel); in literal_value_hash()
6843 r_reloc r_rel; in find_relaxable_sections() local
6865 r_reloc_init (&r_rel, abfd, irel, contents, in find_relaxable_sections()
6868 target_sec = r_reloc_get_section (&r_rel); in find_relaxable_sections()
6890 if (is_l32r_reloc && r_reloc_is_defined (&r_rel)) in find_relaxable_sections()
6937 r_reloc r_rel; in collect_source_relocs() local
6941 r_reloc_init (&r_rel, abfd, irel, contents, sec_size); in collect_source_relocs()
6943 target_sec = r_reloc_get_section (&r_rel); in collect_source_relocs()
6980 init_source_reloc (s_reloc, sec, &r_rel, opcode, opnd, in collect_source_relocs()
7004 r_reloc r_rel; in collect_source_relocs() local
7016 r_reloc_init (&r_rel, abfd, l32r_irel, contents, sec_size); in collect_source_relocs()
7018 target_sec = r_reloc_get_section (&r_rel); in collect_source_relocs()
7078 r_reloc r_rel; in is_resolvable_asm_expansion() local
7105 r_reloc_init (&r_rel, abfd, irel, contents, sec_size); in is_resolvable_asm_expansion()
7106 if (!r_reloc_is_defined (&r_rel)) in is_resolvable_asm_expansion()
7109 target_sec = r_reloc_get_section (&r_rel); in is_resolvable_asm_expansion()
7110 target_offset = r_rel.target_offset; in is_resolvable_asm_expansion()
7993 r_reloc r_rel; in check_section_ebb_pcrels_fit() local
8013 r_reloc_init (&r_rel, abfd, irel, contents, in check_section_ebb_pcrels_fit()
8016 if (r_reloc_get_section (&r_rel) != sec) in check_section_ebb_pcrels_fit()
8020 orig_target_offset = r_rel.target_offset; in check_section_ebb_pcrels_fit()
8248 rel->r_rel.target_offset); in compute_removed_literals()
8261 && src_relocs[i-1].r_rel.target_offset == rel->r_rel.target_offset) in compute_removed_literals()
8266 last_target_offset + 4 != rel->r_rel.target_offset) in compute_removed_literals()
8281 last_target_offset = rel->r_rel.target_offset; in compute_removed_literals()
8295 last_target_offset = rel->r_rel.target_offset; in compute_removed_literals()
8370 sec->vma + rel->r_rel.target_offset); in is_removable_literal()
8378 if (curr_rel->r_rel.target_offset != rel->r_rel.target_offset) in is_removable_literal()
8408 sec->vma + rel->r_rel.target_offset); in remove_dead_literal()
8411 add_removed_literal (&relax_info->removed_list, &rel->r_rel, NULL); in remove_dead_literal()
8414 ta_remove_literal, sec, rel->r_rel.target_offset, 4); in remove_dead_literal()
8428 entry_sec_offset = rel->r_rel.target_offset + 4; in remove_dead_literal()
8480 r_reloc r_rel; in identify_literal_placement() local
8506 r_reloc_init (&r_rel, abfd, irel, contents, sec_size); in identify_literal_placement()
8509 BFD_ASSERT (rel->r_rel.target_offset < sec_size); in identify_literal_placement()
8510 value = bfd_get_32 (abfd, contents + rel->r_rel.target_offset); in identify_literal_placement()
8512 init_literal_value (&val, &r_rel, value, is_abs_literal); in identify_literal_placement()
8562 values->last_loc = rel->r_rel; in identify_literal_placement()
8564 val_map = add_value_map (values, &val, &rel->r_rel, final_static_link); in identify_literal_placement()
8566 val_map->loc = rel->r_rel; in identify_literal_placement()
8588 const r_reloc *r_rel) in relocations_reach() argument
8594 if (!r_reloc_is_defined (r_rel)) in relocations_reach()
8597 sec = r_reloc_get_section (r_rel); in relocations_reach()
8598 from_offset = reloc[0].r_rel.target_offset; in relocations_reach()
8602 if (reloc[i].r_rel.target_offset != from_offset) in relocations_reach()
8611 if (r_reloc_get_section (&reloc[i].r_rel)->output_section in relocations_reach()
8626 + reloc[i].r_rel.rela.r_offset); in relocations_reach()
8629 + r_rel->target_offset); in relocations_reach()
8662 (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); in coalesce_shared_literal()
8667 add_removed_literal (&relax_info->removed_list, &rel->r_rel, &val_map->loc); in coalesce_shared_literal()
8670 ta_remove_literal, sec, rel->r_rel.target_offset, 4); in coalesce_shared_literal()
8681 entry_sec_offset = rel->r_rel.target_offset + 4; in coalesce_shared_literal()
8746 (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); in move_shared_literal()
8818 add_removed_literal (&relax_info->removed_list, &rel->r_rel, target_loc); in move_shared_literal()
8822 ta_remove_literal, sec, rel->r_rel.target_offset, 4); in move_shared_literal()
8833 entry_sec_offset = rel->r_rel.target_offset+4; in move_shared_literal()
8908 r_reloc r_rel; in relax_section() local
8923 r_reloc_init (&r_rel, abfd, irel, contents, in relax_section()
8974 r_reloc_init (&r_rel, abfd, irel, contents, sec_size); in relax_section()
8987 target_sec = r_reloc_get_section (&r_rel); in relax_section()
9043 target_sec = translate_reloc (&r_rel, &new_reloc, target_sec); in relax_section()
9078 r_rel.target_offset + diff_value); in relax_section()
9672 const r_reloc *r_rel; in move_literal() local
9674 r_rel = &lit->r_rel; in move_literal()
9677 if (r_reloc_is_const (r_rel)) in move_literal()
9686 r_type = ELF32_R_TYPE (r_rel->rela.r_info); in move_literal()
9692 r_rel->target_offset - r_reloc_get_target_offset (r_rel); in move_literal()
9698 r_reloc_get_section (r_rel), in move_literal()
9699 r_rel->target_offset + r_rel->virtual_offset, in move_literal()
9844 r_reloc_init (&val.r_rel, abfd, irel, contents, sec_size); in relax_property_section()
9851 target_sec = r_reloc_get_section (&val.r_rel); in relax_property_section()
9859 bfd_vma old_offset = val.r_rel.target_offset; in relax_property_section()
10214 r_reloc r_rel; in do_fix_for_relocatable_link() local
10227 r_reloc_init (&r_rel, input_bfd, rel, contents, in do_fix_for_relocatable_link()
10229 old_sec = r_reloc_get_section (&r_rel); in do_fix_for_relocatable_link()
10230 old_offset = r_rel.target_offset; in do_fix_for_relocatable_link()
10232 if (!old_sec || !r_reloc_is_defined (&r_rel)) in do_fix_for_relocatable_link()