Lines Matching refs:contents
129 asection *input_section, bfd_byte *contents, in sh_elf_reloc_loop() argument
162 if (elf_section_data (symbol_section)->this_hdr.contents != NULL) in sh_elf_reloc_loop()
163 contents = elf_section_data (symbol_section)->this_hdr.contents; in sh_elf_reloc_loop()
167 &contents)) in sh_elf_reloc_loop()
169 if (contents != NULL) in sh_elf_reloc_loop()
170 free (contents); in sh_elf_reloc_loop()
176 start_ptr = contents + start; in sh_elf_reloc_loop()
177 for (cum_diff = -6, ptr = contents + end; cum_diff < 0 && ptr > start_ptr;) in sh_elf_reloc_loop()
192 end = (ptr + cum_diff * 2) - contents; in sh_elf_reloc_loop()
198 while (start0 && IS_PPI (contents + start0)) in sh_elf_reloc_loop()
205 if (contents != NULL in sh_elf_reloc_loop()
206 && elf_section_data (symbol_section)->this_hdr.contents != contents) in sh_elf_reloc_loop()
207 free (contents); in sh_elf_reloc_loop()
209 insn = bfd_get_16 (input_bfd, contents + addr); in sh_elf_reloc_loop()
221 bfd_put_16 (input_bfd, (bfd_vma) x, contents + addr); in sh_elf_reloc_loop()
506 bfd_byte *contents = NULL; in sh_elf_relax_section() local
549 if (contents == NULL) in sh_elf_relax_section()
551 if (elf_section_data (sec)->this_hdr.contents != NULL) in sh_elf_relax_section()
552 contents = elf_section_data (sec)->this_hdr.contents; in sh_elf_relax_section()
555 if (!bfd_malloc_and_get_section (abfd, sec, &contents)) in sh_elf_relax_section()
572 insn = bfd_get_16 (abfd, contents + laddr); in sh_elf_relax_section()
619 isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; in sh_elf_relax_section()
671 symval += bfd_get_32 (abfd, contents + paddr); in sh_elf_relax_section()
702 elf_section_data (sec)->this_hdr.contents = contents; in sh_elf_relax_section()
703 symtab_hdr->contents = (unsigned char *) isymbuf; in sh_elf_relax_section()
719 if (bfd_get_16 (abfd, contents + irel->r_offset) & 0x0020) in sh_elf_relax_section()
720 bfd_put_16 (abfd, (bfd_vma) 0xa000, contents + irel->r_offset); in sh_elf_relax_section()
722 bfd_put_16 (abfd, (bfd_vma) 0xb000, contents + irel->r_offset); in sh_elf_relax_section()
730 irel->r_addend += bfd_get_32 (abfd, contents + paddr); in sh_elf_relax_section()
805 if (contents == NULL) in sh_elf_relax_section()
807 if (elf_section_data (sec)->this_hdr.contents != NULL) in sh_elf_relax_section()
808 contents = elf_section_data (sec)->this_hdr.contents; in sh_elf_relax_section()
811 if (!bfd_malloc_and_get_section (abfd, sec, &contents)) in sh_elf_relax_section()
816 if (! sh_elf_align_loads (abfd, sec, internal_relocs, contents, in sh_elf_relax_section()
823 elf_section_data (sec)->this_hdr.contents = contents; in sh_elf_relax_section()
824 symtab_hdr->contents = (unsigned char *) isymbuf; in sh_elf_relax_section()
829 && symtab_hdr->contents != (unsigned char *) isymbuf) in sh_elf_relax_section()
836 symtab_hdr->contents = (unsigned char *) isymbuf; in sh_elf_relax_section()
840 if (contents != NULL in sh_elf_relax_section()
841 && elf_section_data (sec)->this_hdr.contents != contents) in sh_elf_relax_section()
844 free (contents); in sh_elf_relax_section()
848 elf_section_data (sec)->this_hdr.contents = contents; in sh_elf_relax_section()
860 && symtab_hdr->contents != (unsigned char *) isymbuf) in sh_elf_relax_section()
862 if (contents != NULL in sh_elf_relax_section()
863 && elf_section_data (sec)->this_hdr.contents != contents) in sh_elf_relax_section()
864 free (contents); in sh_elf_relax_section()
882 bfd_byte *contents; in sh_elf_relax_delete_bytes() local
893 isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; in sh_elf_relax_delete_bytes()
897 contents = elf_section_data (sec)->this_hdr.contents; in sh_elf_relax_delete_bytes()
920 memmove (contents + addr, contents + addr + count, in sh_elf_relax_delete_bytes()
932 bfd_put_16 (abfd, (bfd_vma) NOP_OPCODE, contents + toaddr - count + i); in sh_elf_relax_delete_bytes()
977 insn = bfd_get_16 (abfd, contents + nraddr); in sh_elf_relax_delete_bytes()
1003 val = bfd_get_32 (abfd, contents + nraddr); in sh_elf_relax_delete_bytes()
1006 bfd_put_32 (abfd, val - count, contents + nraddr); in sh_elf_relax_delete_bytes()
1087 voff = bfd_get_signed_16 (abfd, contents + nraddr); in sh_elf_relax_delete_bytes()
1089 voff = bfd_get_8 (abfd, contents + nraddr); in sh_elf_relax_delete_bytes()
1091 voff = bfd_get_signed_32 (abfd, contents + nraddr); in sh_elf_relax_delete_bytes()
1130 bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); in sh_elf_relax_delete_bytes()
1137 bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); in sh_elf_relax_delete_bytes()
1151 bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); in sh_elf_relax_delete_bytes()
1158 bfd_put_8 (abfd, voff, contents + nraddr); in sh_elf_relax_delete_bytes()
1165 bfd_put_signed_16 (abfd, (bfd_vma) voff, contents + nraddr); in sh_elf_relax_delete_bytes()
1170 bfd_put_signed_32 (abfd, (bfd_vma) voff, contents + nraddr); in sh_elf_relax_delete_bytes()
1225 if (elf_section_data (o)->this_hdr.contents != NULL) in sh_elf_relax_delete_bytes()
1226 ocontents = elf_section_data (o)->this_hdr.contents; in sh_elf_relax_delete_bytes()
1240 elf_section_data (o)->this_hdr.contents = ocontents; in sh_elf_relax_delete_bytes()
1283 if (elf_section_data (o)->this_hdr.contents != NULL) in sh_elf_relax_delete_bytes()
1284 ocontents = elf_section_data (o)->this_hdr.contents; in sh_elf_relax_delete_bytes()
1298 elf_section_data (o)->this_hdr.contents = ocontents; in sh_elf_relax_delete_bytes()
1365 bfd_byte *contents ATTRIBUTE_UNUSED, in sh_elf_align_loads()
1416 if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_elf_swap_insns, in sh_elf_align_loads()
1437 bfd_byte *contents, bfd_vma addr) in sh_elf_swap_insns() argument
1444 i1 = bfd_get_16 (abfd, contents + addr); in sh_elf_swap_insns()
1445 i2 = bfd_get_16 (abfd, contents + addr + 2); in sh_elf_swap_insns()
1446 bfd_put_16 (abfd, (bfd_vma) i2, contents + addr); in sh_elf_swap_insns()
1447 bfd_put_16 (abfd, (bfd_vma) i1, contents + addr + 2); in sh_elf_swap_insns()
1502 loc = contents + irel->r_offset; in sh_elf_swap_insns()
3341 s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; in sh_elf_size_dynamic_sections()
3566 s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); in sh_elf_size_dynamic_sections()
3567 if (s->contents == NULL) in sh_elf_size_dynamic_sections()
3646 sreloc->contents + reloc_offset); in sh_elf_add_dyn_reloc()
3661 bfd_put_32 (output_bfd, offset, srofixup->contents + fixup_offset); in sh_elf_add_rofixup()
3769 bfd_put_32 (output_bfd, addr, htab->sfuncdesc->contents + offset); in sh_elf_initialize_funcdesc()
3770 bfd_put_32 (output_bfd, seg, htab->sfuncdesc->contents + offset + 4); in sh_elf_initialize_funcdesc()
3782 bfd_byte *contents, bfd_vma offset) in install_movi20_field() argument
3796 addr = contents + offset; in install_movi20_field()
3809 bfd_byte *contents, Elf_Internal_Rela *relocs, in sh_elf_relocate_section() argument
3978 contents + rel->r_offset); in sh_elf_relocate_section()
4003 addend = bfd_get_32 (input_bfd, contents + rel->r_offset); in sh_elf_relocate_section()
4009 bfd_put_32 (input_bfd, addend, contents + rel->r_offset); in sh_elf_relocate_section()
4139 rel, 1, relend, howto, 0, contents); in sh_elf_relocate_section()
4160 contents, rel->r_offset, in sh_elf_relocate_section()
4208 contents, rel, &relocation)) in sh_elf_relocate_section()
4333 ? bfd_get_32 (input_bfd, contents + rel->r_offset) in sh_elf_relocate_section()
4361 ? bfd_get_32 (input_bfd, contents + rel->r_offset) in sh_elf_relocate_section()
4384 ? bfd_get_32 (input_bfd, contents + rel->r_offset) in sh_elf_relocate_section()
4388 loc = sreloc->contents; in sh_elf_relocate_section()
4533 sgot->contents + off); in sh_elf_relocate_section()
4592 bfd_put_32 (output_bfd, relocation, sgot->contents + off); in sh_elf_relocate_section()
4622 loc = srelgot->contents; in sh_elf_relocate_section()
4652 input_bfd, input_section, contents, in sh_elf_relocate_section()
4686 input_bfd, input_section, contents, in sh_elf_relocate_section()
4955 reloc_section->contents + reloc_offset); in sh_elf_relocate_section()
4971 input_bfd, input_section, contents, in sh_elf_relocate_section()
5048 input_bfd, input_section, contents, in sh_elf_relocate_section()
5061 r = sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, in sh_elf_relocate_section()
5068 r = sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, in sh_elf_relocate_section()
5113 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5118 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5122 insn = bfd_get_16 (input_bfd, contents + offset + 2); in sh_elf_relocate_section()
5124 insn = bfd_get_16 (input_bfd, contents + offset + 4); in sh_elf_relocate_section()
5126 insn = bfd_get_16 (input_bfd, contents + offset + 6); in sh_elf_relocate_section()
5128 insn = bfd_get_16 (input_bfd, contents + offset + 8); in sh_elf_relocate_section()
5130 insn = bfd_get_16 (input_bfd, contents + offset + 10); in sh_elf_relocate_section()
5133 bfd_put_16 (output_bfd, 0x0012, contents + offset + 2); in sh_elf_relocate_section()
5134 bfd_put_16 (output_bfd, 0x304c, contents + offset + 4); in sh_elf_relocate_section()
5135 bfd_put_16 (output_bfd, 0x0009, contents + offset + 6); in sh_elf_relocate_section()
5136 bfd_put_16 (output_bfd, 0x0009, contents + offset + 8); in sh_elf_relocate_section()
5137 bfd_put_16 (output_bfd, 0x0009, contents + offset + 10); in sh_elf_relocate_section()
5154 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5159 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5164 insn = bfd_get_16 (input_bfd, contents + offset + 2); in sh_elf_relocate_section()
5166 insn = bfd_get_16 (input_bfd, contents + offset + 4); in sh_elf_relocate_section()
5169 bfd_put_16 (output_bfd, insn, contents + offset + 0); in sh_elf_relocate_section()
5170 bfd_put_16 (output_bfd, 0x0009, contents + offset + 4); in sh_elf_relocate_section()
5174 contents + rel->r_offset); in sh_elf_relocate_section()
5197 sgot->contents + off); in sh_elf_relocate_section()
5199 contents + rel->r_offset); in sh_elf_relocate_section()
5232 loc = srelgot->contents; in sh_elf_relocate_section()
5242 sgot->contents + off + 4); in sh_elf_relocate_section()
5285 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5290 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5296 bfd_put_16 (output_bfd, insn & 0xf0ff, contents + offset); in sh_elf_relocate_section()
5298 insn = bfd_get_16 (input_bfd, contents + offset + 2); in sh_elf_relocate_section()
5300 insn = bfd_get_16 (input_bfd, contents + offset + 4); in sh_elf_relocate_section()
5302 insn = bfd_get_16 (input_bfd, contents + offset + 6); in sh_elf_relocate_section()
5304 insn = bfd_get_16 (input_bfd, contents + offset + 8); in sh_elf_relocate_section()
5306 insn = bfd_get_16 (input_bfd, contents + offset + 10); in sh_elf_relocate_section()
5309 bfd_put_16 (output_bfd, 0x0412, contents + offset + 2); in sh_elf_relocate_section()
5310 bfd_put_16 (output_bfd, 0x00ce, contents + offset + 4); in sh_elf_relocate_section()
5311 bfd_put_16 (output_bfd, 0x304c, contents + offset + 6); in sh_elf_relocate_section()
5312 bfd_put_16 (output_bfd, 0x0009, contents + offset + 8); in sh_elf_relocate_section()
5313 bfd_put_16 (output_bfd, 0x0009, contents + offset + 10); in sh_elf_relocate_section()
5316 contents + rel->r_offset); in sh_elf_relocate_section()
5345 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5350 insn = bfd_get_16 (input_bfd, contents + offset + 0); in sh_elf_relocate_section()
5354 insn = bfd_get_16 (input_bfd, contents + offset + 2); in sh_elf_relocate_section()
5356 insn = bfd_get_16 (input_bfd, contents + offset + 4); in sh_elf_relocate_section()
5358 insn = bfd_get_16 (input_bfd, contents + offset + 6); in sh_elf_relocate_section()
5360 insn = bfd_get_16 (input_bfd, contents + offset + 8); in sh_elf_relocate_section()
5362 insn = bfd_get_16 (input_bfd, contents + offset + 10); in sh_elf_relocate_section()
5365 bfd_put_16 (output_bfd, 0x0012, contents + offset + 0); in sh_elf_relocate_section()
5366 bfd_put_16 (output_bfd, 0x0009, contents + offset + 2); in sh_elf_relocate_section()
5367 bfd_put_16 (output_bfd, 0x0009, contents + offset + 4); in sh_elf_relocate_section()
5368 bfd_put_16 (output_bfd, 0x0009, contents + offset + 6); in sh_elf_relocate_section()
5369 bfd_put_16 (output_bfd, 0x0009, contents + offset + 8); in sh_elf_relocate_section()
5370 bfd_put_16 (output_bfd, 0x0009, contents + offset + 10); in sh_elf_relocate_section()
5394 loc = srelgot->contents; in sh_elf_relocate_section()
5452 loc = sreloc->contents; in sh_elf_relocate_section()
5539 || elf_section_data (input_section)->this_hdr.contents == NULL) in sh_elf_get_relocated_section_contents()
5547 memcpy (data, elf_section_data (input_section)->this_hdr.contents, in sh_elf_get_relocated_section_contents()
5565 isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; in sh_elf_get_relocated_section_contents()
5605 && symtab_hdr->contents != (unsigned char *) isymbuf) in sh_elf_get_relocated_section_contents()
5617 && symtab_hdr->contents != (unsigned char *) isymbuf) in sh_elf_get_relocated_section_contents()
6742 memcpy (splt->contents + h->plt.offset, in sh_elf_finish_dynamic_symbol()
6752 splt->owner, splt, splt->contents, in sh_elf_finish_dynamic_symbol()
6759 (splt->contents in sh_elf_finish_dynamic_symbol()
6771 (splt->contents in sh_elf_finish_dynamic_symbol()
6801 (splt->contents in sh_elf_finish_dynamic_symbol()
6808 (splt->contents in sh_elf_finish_dynamic_symbol()
6824 (splt->contents in sh_elf_finish_dynamic_symbol()
6834 sgotplt->contents + got_offset); in sh_elf_finish_dynamic_symbol()
6839 sgotplt->contents + got_offset + 4); in sh_elf_finish_dynamic_symbol()
6853 loc = srelplt->contents + plt_index * sizeof (Elf32_External_Rela); in sh_elf_finish_dynamic_symbol()
6860 loc = (htab->srelplt2->contents in sh_elf_finish_dynamic_symbol()
6941 bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); in sh_elf_finish_dynamic_symbol()
6946 loc = srelgot->contents; in sh_elf_finish_dynamic_symbol()
7002 bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents in sh_elf_finish_dynamic_symbol()
7008 loc = srelgot->contents; in sh_elf_finish_dynamic_symbol()
7035 loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela); in sh_elf_finish_dynamic_symbol()
7072 dyncon = (Elf32_External_Dyn *) sdyn->contents; in sh_elf_finish_dynamic_sections()
7073 dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size); in sh_elf_finish_dynamic_sections()
7163 memcpy (splt->contents, in sh_elf_finish_dynamic_sections()
7172 (splt->contents in sh_elf_finish_dynamic_sections()
7183 loc = htab->srelplt2->contents; in sh_elf_finish_dynamic_sections()
7196 while (loc < htab->srelplt2->contents + htab->srelplt2->size) in sh_elf_finish_dynamic_sections()
7224 bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents); in sh_elf_finish_dynamic_sections()
7228 sgotplt->contents); in sh_elf_finish_dynamic_sections()
7229 bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents + 4); in sh_elf_finish_dynamic_sections()
7230 bfd_put_32 (output_bfd, (bfd_vma) 0, sgotplt->contents + 8); in sh_elf_finish_dynamic_sections()