| /netbsd-src/lib/libc/stdlib/ |
| H A D | unsetenv.c | 60 ssize_t r_offset, w_offset; in unsetenv() local 74 r_offset = __getenvslot(name, l_name, false); in unsetenv() 75 if (r_offset == -1) { in unsetenv() 80 __freeenvvar(environ[r_offset]); in unsetenv() 86 w_offset = r_offset; in unsetenv() 87 while (environ[++r_offset] != NULL) { in unsetenv() 88 if (strncmp(environ[r_offset], name, l_name) != 0 || in unsetenv() 89 environ[r_offset][l_name] != '=') { in unsetenv() 91 environ[w_offset++] = environ[r_offset]; in unsetenv() 94 __freeenvvar(environ[r_offset]); in unsetenv() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/bfd/ |
| H A D | elf32-m68hc11.c | 569 if (i1->r_offset == i2->r_offset) in compare_reloc() 572 return i1->r_offset < i2->r_offset ? -1 : 1; in compare_reloc() 790 if (irel->r_offset + 2 >= sec->size) in m68hc11_elf_relax_section() 796 code = bfd_get_8 (abfd, contents + irel->r_offset + 2); in m68hc11_elf_relax_section() 804 || irel->r_offset + 3 != nrel->r_offset in m68hc11_elf_relax_section() 810 roffset = bfd_get_8 (abfd, contents + irel->r_offset + 1); in m68hc11_elf_relax_section() 876 if (irel->r_offset == sec->size) in m68hc11_elf_relax_section() 918 offset = value - (prev_insn_branch->r_offset in m68hc11_elf_relax_section() 931 code = bfd_get_8 (abfd, contents + prev_insn_branch->r_offset); in m68hc11_elf_relax_section() 935 bfd_put_8 (abfd, code, contents + prev_insn_branch->r_offset); in m68hc11_elf_relax_section() [all …]
|
| H A D | elf32-h8300.c | 490 contents, rel->r_offset, in elf32_h8_relocate_section() 514 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in elf32_h8_relocate_section() 519 (info, name, input_bfd, input_section, rel->r_offset, true); in elf32_h8_relocate_section() 540 input_section, rel->r_offset); in elf32_h8_relocate_section() 842 + sec->output_offset + irel->r_offset - 1); in elf32_h8_relax_section() 861 code = bfd_get_8 (abfd, contents + irel->r_offset - 1); in elf32_h8_relax_section() 911 && last_reloc->r_offset + 2 == irel->r_offset in elf32_h8_relax_section() 926 contents + last_reloc->r_offset - 1); in elf32_h8_relax_section() 930 contents + last_reloc->r_offset - 1); in elf32_h8_relax_section() 934 irel->r_offset - 1, in elf32_h8_relax_section() [all …]
|
| H A D | elf32-msp430.c | 834 + rel->r_offset), howto->type); in msp430_final_link_relocate() 896 _bfd_read_unsigned_leb128 (input_bfd, contents + rel->r_offset, &len); in msp430_final_link_relocate() 899 p = contents + rel->r_offset; in msp430_final_link_relocate() 916 (long) rel->r_offset, input_section, input_bfd); in msp430_final_link_relocate() 947 contents += rel->r_offset; in msp430_final_link_relocate() 957 contents += rel->r_offset; in msp430_final_link_relocate() 963 srel -= rel->r_offset; in msp430_final_link_relocate() 998 contents += rel->r_offset; in msp430_final_link_relocate() 1010 srel -= rel->r_offset; in msp430_final_link_relocate() 1021 contents += rel->r_offset; in msp430_final_link_relocate() [all …]
|
| H A D | elf-m10200.c | 400 contents, rel->r_offset, in mn10200_elf_relocate_section() 424 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in mn10200_elf_relocate_section() 430 rel->r_offset, true); in mn10200_elf_relocate_section() 451 input_section, rel->r_offset); in mn10200_elf_relocate_section() 495 if ((irel->r_offset > addr in mn10200_elf_relax_delete_bytes() 496 && irel->r_offset < toaddr)) in mn10200_elf_relax_delete_bytes() 497 irel->r_offset -= count; in mn10200_elf_relax_delete_bytes() 693 value -= (irel->r_offset + 3); in mn10200_elf_relax_section() 704 code = bfd_get_8 (abfd, contents + irel->r_offset - 1); in mn10200_elf_relax_section() 716 bfd_put_8 (abfd, 0xfc, contents + irel->r_offset - 2); in mn10200_elf_relax_section() [all …]
|
| H A D | elf32-cr16.c | 1239 if ((irel->r_offset > addr && irel->r_offset < toaddr)) in elf32_cr16_relax_delete_bytes() 1240 irel->r_offset -= count; in elf32_cr16_relax_delete_bytes() 1394 contents, rel->r_offset, in elf32_cr16_relocate_section() 1420 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in elf32_cr16_relocate_section() 1425 (info, name, input_bfd, input_section, rel->r_offset, true); in elf32_cr16_relocate_section() 1446 input_section, rel->r_offset); in elf32_cr16_relocate_section() 1831 value -= irel->r_offset; in elf32_cr16_relax_section() 1843 contents + irel->r_offset); in elf32_cr16_relax_section() 1848 contents + irel->r_offset); in elf32_cr16_relax_section() 1863 irel->r_offset + 2, 2)) in elf32_cr16_relax_section() [all …]
|
| H A D | elf32-avr.c | 1036 reloc_addr = rel->r_offset + input_section->output_section->vma in avr_final_link_relocate() 1042 contents += rel->r_offset; in avr_final_link_relocate() 1045 srel -= rel->r_offset; in avr_final_link_relocate() 1060 contents += rel->r_offset; in avr_final_link_relocate() 1063 srel -= rel->r_offset; in avr_final_link_relocate() 1100 contents += rel->r_offset; in avr_final_link_relocate() 1108 contents += rel->r_offset; in avr_final_link_relocate() 1121 contents += rel->r_offset; in avr_final_link_relocate() 1133 contents += rel->r_offset; in avr_final_link_relocate() 1144 contents += rel->r_offset; in avr_final_link_relocate() [all …]
|
| H A D | elf32-ft32.c | 419 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in ft32_elf_relocate_section() 423 offset += (int)(rel->r_addend - rel->r_offset); in ft32_elf_relocate_section() 433 bfd_put_32 (input_bfd, insn, contents + rel->r_offset); in ft32_elf_relocate_section() 444 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in ft32_elf_relocate_section() 448 offset += (int)(rel->r_addend - rel->r_offset); in ft32_elf_relocate_section() 458 bfd_put_32 (input_bfd, insn, contents + rel->r_offset); in ft32_elf_relocate_section() 469 contents, rel->r_offset, in ft32_elf_relocate_section() 483 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in ft32_elf_relocate_section() 488 (info, name, input_bfd, input_section, rel->r_offset, true); in ft32_elf_relocate_section() 510 input_section, rel->r_offset); in ft32_elf_relocate_section() [all …]
|
| H A D | elf32-ip2k.c | 551 ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents)) in ip2k_test_page_insn() 620 if (addr <= irel->r_offset && irel->r_offset < endaddr) in adjust_all_relocations() 621 irel->r_offset += count; in adjust_all_relocations() 678 stabp = stabcontents + irel->r_offset - 8; in adjust_all_relocations() 818 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2)) in ip2k_delete_page_insn() 840 addr = irel->r_offset; in ip2k_relax_switch_table_128() 859 if (ireltest->r_offset != addr) in ip2k_relax_switch_table_128() 874 ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 4, code); in ip2k_relax_switch_table_128() 882 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2)) in ip2k_relax_switch_table_128() 911 addr = irel->r_offset; in ip2k_relax_switch_table_256() [all …]
|
| H A D | elf-m10300.c | 1133 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) in mn10300_elf_check_relocs() 1544 outrel.r_offset = _bfd_elf_section_offset (input_bfd, info, in mn10300_elf_final_link_relocate() 1546 if (outrel.r_offset == (bfd_vma) -1) in mn10300_elf_final_link_relocate() 1549 outrel.r_offset += (input_section->output_section->vma in mn10300_elf_final_link_relocate() 1803 rel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 1880 outrel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 1887 outrel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 2031 contents, rel->r_offset); in mn10300_elf_relocate_section() 2039 && rel->r_offset + had_plt == trel->r_offset) in mn10300_elf_relocate_section() 2089 rel->r_offset) != (bfd_vma) -1) in mn10300_elf_relocate_section() [all …]
|
| H A D | elf32-i386.c | 864 offset = rel->r_offset; in elf_i386_check_tls_transition() 1186 (uint64_t) rel->r_offset, sec); in elf_i386_tls_transition() 1237 bfd_vma roff = irel->r_offset; in elf_i386_convert_load_reloc() 1362 nop_offset = irel->r_offset - 2; in elf_i386_convert_load_reloc() 1370 irel->r_offset -= 1; in elf_i386_convert_load_reloc() 1382 irel->r_offset -= 1; in elf_i386_convert_load_reloc() 1386 bfd_put_8 (abfd, modrm, contents + irel->r_offset - 1); in elf_i386_convert_load_reloc() 1389 bfd_put_32 (abfd, -4, contents + irel->r_offset); in elf_i386_convert_load_reloc() 1923 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) in elf_i386_scan_relocs() 1930 if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) in elf_i386_scan_relocs() [all …]
|
| H A D | elf32-pru.c | 773 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 780 rel->r_offset, relocation, in pru_elf32_relocate_section() 790 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 795 addend = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 800 addend = bfd_get_16 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 810 contents, rel->r_offset, in pru_elf32_relocate_section() 818 rel->r_offset, in pru_elf32_relocate_section() 827 rel->r_offset, in pru_elf32_relocate_section() 835 in1 = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 836 in2 = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); in pru_elf32_relocate_section() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/bfd/ |
| H A D | elf32-m68hc11.c | 569 if (i1->r_offset == i2->r_offset) in compare_reloc() 572 return i1->r_offset < i2->r_offset ? -1 : 1; in compare_reloc() 789 if (irel->r_offset + 2 >= sec->size) in m68hc11_elf_relax_section() 795 code = bfd_get_8 (abfd, contents + irel->r_offset + 2); in m68hc11_elf_relax_section() 803 || irel->r_offset + 3 != nrel->r_offset in m68hc11_elf_relax_section() 809 roffset = bfd_get_8 (abfd, contents + irel->r_offset + 1); in m68hc11_elf_relax_section() 875 if (irel->r_offset == sec->size) in m68hc11_elf_relax_section() 917 offset = value - (prev_insn_branch->r_offset in m68hc11_elf_relax_section() 930 code = bfd_get_8 (abfd, contents + prev_insn_branch->r_offset); in m68hc11_elf_relax_section() 934 bfd_put_8 (abfd, code, contents + prev_insn_branch->r_offset); in m68hc11_elf_relax_section() [all …]
|
| H A D | elf32-h8300.c | 490 contents, rel->r_offset, in elf32_h8_relocate_section() 514 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in elf32_h8_relocate_section() 519 (info, name, input_bfd, input_section, rel->r_offset, true); in elf32_h8_relocate_section() 540 input_section, rel->r_offset); in elf32_h8_relocate_section() 841 + sec->output_offset + irel->r_offset - 1); in elf32_h8_relax_section() 860 code = bfd_get_8 (abfd, contents + irel->r_offset - 1); in elf32_h8_relax_section() 910 && last_reloc->r_offset + 2 == irel->r_offset in elf32_h8_relax_section() 925 contents + last_reloc->r_offset - 1); in elf32_h8_relax_section() 929 contents + last_reloc->r_offset - 1); in elf32_h8_relax_section() 933 irel->r_offset - 1, in elf32_h8_relax_section() [all …]
|
| H A D | elf32-msp430.c | 834 + rel->r_offset), howto->type); in msp430_final_link_relocate() 896 _bfd_read_unsigned_leb128 (input_bfd, contents + rel->r_offset, &len); in msp430_final_link_relocate() 899 p = contents + rel->r_offset; in msp430_final_link_relocate() 916 (long) rel->r_offset, input_section, input_bfd); in msp430_final_link_relocate() 947 contents += rel->r_offset; in msp430_final_link_relocate() 957 contents += rel->r_offset; in msp430_final_link_relocate() 963 srel -= rel->r_offset; in msp430_final_link_relocate() 998 contents += rel->r_offset; in msp430_final_link_relocate() 1010 srel -= rel->r_offset; in msp430_final_link_relocate() 1021 contents += rel->r_offset; in msp430_final_link_relocate() [all …]
|
| H A D | elf-m10200.c | 400 contents, rel->r_offset, in mn10200_elf_relocate_section() 424 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in mn10200_elf_relocate_section() 430 rel->r_offset, true); in mn10200_elf_relocate_section() 451 input_section, rel->r_offset); in mn10200_elf_relocate_section() 495 if ((irel->r_offset > addr in mn10200_elf_relax_delete_bytes() 496 && irel->r_offset < toaddr)) in mn10200_elf_relax_delete_bytes() 497 irel->r_offset -= count; in mn10200_elf_relax_delete_bytes() 692 value -= (irel->r_offset + 3); in mn10200_elf_relax_section() 703 code = bfd_get_8 (abfd, contents + irel->r_offset - 1); in mn10200_elf_relax_section() 715 bfd_put_8 (abfd, 0xfc, contents + irel->r_offset - 2); in mn10200_elf_relax_section() [all …]
|
| H A D | elf32-cr16.c | 1239 if ((irel->r_offset > addr && irel->r_offset < toaddr)) in elf32_cr16_relax_delete_bytes() 1240 irel->r_offset -= count; in elf32_cr16_relax_delete_bytes() 1394 contents, rel->r_offset, in elf32_cr16_relocate_section() 1420 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in elf32_cr16_relocate_section() 1425 (info, name, input_bfd, input_section, rel->r_offset, true); in elf32_cr16_relocate_section() 1446 input_section, rel->r_offset); in elf32_cr16_relocate_section() 1821 value -= irel->r_offset; in elf32_cr16_relax_section() 1833 contents + irel->r_offset); in elf32_cr16_relax_section() 1838 contents + irel->r_offset); in elf32_cr16_relax_section() 1853 irel->r_offset + 2, 2)) in elf32_cr16_relax_section() [all …]
|
| H A D | elf32-avr.c | 1036 reloc_addr = rel->r_offset + input_section->output_section->vma in avr_final_link_relocate() 1042 contents += rel->r_offset; in avr_final_link_relocate() 1045 srel -= rel->r_offset; in avr_final_link_relocate() 1060 contents += rel->r_offset; in avr_final_link_relocate() 1063 srel -= rel->r_offset; in avr_final_link_relocate() 1100 contents += rel->r_offset; in avr_final_link_relocate() 1108 contents += rel->r_offset; in avr_final_link_relocate() 1121 contents += rel->r_offset; in avr_final_link_relocate() 1133 contents += rel->r_offset; in avr_final_link_relocate() 1144 contents += rel->r_offset; in avr_final_link_relocate() [all …]
|
| H A D | elf32-ft32.c | 419 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in ft32_elf_relocate_section() 423 offset += (int)(rel->r_addend - rel->r_offset); in ft32_elf_relocate_section() 433 bfd_put_32 (input_bfd, insn, contents + rel->r_offset); in ft32_elf_relocate_section() 444 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in ft32_elf_relocate_section() 448 offset += (int)(rel->r_addend - rel->r_offset); in ft32_elf_relocate_section() 458 bfd_put_32 (input_bfd, insn, contents + rel->r_offset); in ft32_elf_relocate_section() 469 contents, rel->r_offset, in ft32_elf_relocate_section() 483 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in ft32_elf_relocate_section() 488 (info, name, input_bfd, input_section, rel->r_offset, true); in ft32_elf_relocate_section() 510 input_section, rel->r_offset); in ft32_elf_relocate_section() [all …]
|
| H A D | elf32-ip2k.c | 551 ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents)) in ip2k_test_page_insn() 620 if (addr <= irel->r_offset && irel->r_offset < endaddr) in adjust_all_relocations() 621 irel->r_offset += count; in adjust_all_relocations() 678 stabp = stabcontents + irel->r_offset - 8; in adjust_all_relocations() 818 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2)) in ip2k_delete_page_insn() 840 addr = irel->r_offset; in ip2k_relax_switch_table_128() 859 if (ireltest->r_offset != addr) in ip2k_relax_switch_table_128() 874 ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 4, code); in ip2k_relax_switch_table_128() 882 if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2)) in ip2k_relax_switch_table_128() 911 addr = irel->r_offset; in ip2k_relax_switch_table_256() [all …]
|
| H A D | elf-m10300.c | 1133 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) in mn10300_elf_check_relocs() 1544 outrel.r_offset = _bfd_elf_section_offset (input_bfd, info, in mn10300_elf_final_link_relocate() 1546 if (outrel.r_offset == (bfd_vma) -1) in mn10300_elf_final_link_relocate() 1549 outrel.r_offset += (input_section->output_section->vma in mn10300_elf_final_link_relocate() 1803 rel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 1880 outrel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 1887 outrel.r_offset = (sgot->output_section->vma in mn10300_elf_final_link_relocate() 2031 contents, rel->r_offset); in mn10300_elf_relocate_section() 2039 && rel->r_offset + had_plt == trel->r_offset) in mn10300_elf_relocate_section() 2089 rel->r_offset) != (bfd_vma) -1) in mn10300_elf_relocate_section() [all …]
|
| H A D | elf32-i386.c | 864 offset = rel->r_offset; in elf_i386_check_tls_transition() 1172 (uint64_t) rel->r_offset, sec); in elf_i386_tls_transition() 1223 bfd_vma roff = irel->r_offset; in elf_i386_convert_load_reloc() 1342 nop_offset = irel->r_offset - 2; in elf_i386_convert_load_reloc() 1350 irel->r_offset -= 1; in elf_i386_convert_load_reloc() 1362 irel->r_offset -= 1; in elf_i386_convert_load_reloc() 1366 bfd_put_8 (abfd, modrm, contents + irel->r_offset - 1); in elf_i386_convert_load_reloc() 1369 bfd_put_32 (abfd, -4, contents + irel->r_offset); in elf_i386_convert_load_reloc() 1898 if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) in elf_i386_scan_relocs() 1905 if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) in elf_i386_scan_relocs() [all …]
|
| H A D | elf32-pru.c | 773 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 780 rel->r_offset, relocation, in pru_elf32_relocate_section() 790 insn = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 795 addend = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 800 addend = bfd_get_16 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 810 contents, rel->r_offset, in pru_elf32_relocate_section() 818 rel->r_offset, in pru_elf32_relocate_section() 827 rel->r_offset, in pru_elf32_relocate_section() 835 in1 = bfd_get_32 (input_bfd, contents + rel->r_offset); in pru_elf32_relocate_section() 836 in2 = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); in pru_elf32_relocate_section() [all …]
|
| H A D | elf32-crx.c | 621 if ((irel->r_offset > addr in elf32_crx_relax_delete_bytes() 622 && irel->r_offset < toaddr)) in elf32_crx_relax_delete_bytes() 623 irel->r_offset -= count; in elf32_crx_relax_delete_bytes() 880 contents, rel->r_offset, in elf32_crx_relocate_section() 904 (bfd_vma) 0, input_bfd, input_section, rel->r_offset); in elf32_crx_relocate_section() 909 (info, name, input_bfd, input_section, rel->r_offset, true); in elf32_crx_relocate_section() 930 input_section, rel->r_offset); in elf32_crx_relocate_section() 1076 value -= irel->r_offset; in elf32_crx_relax_section() 1087 code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset); in elf32_crx_relax_section() 1091 bfd_put_8 (abfd, 0x30, contents + irel->r_offset + 1); in elf32_crx_relax_section() [all …]
|
| H A D | elf32-m32c.c | 483 rel->r_offset, true); in m32c_elf_relocate_section() 570 rel->r_offset + input_section->output_section->vma + input_section->output_offset, in m32c_elf_relocate_section() 575 printf (" %02x", contents[rel->r_offset+i]); in m32c_elf_relocate_section() 586 if (rel->r_offset + 3 in m32c_elf_relocate_section() 591 bfd_put_8 (input_bfd, relocation & 0xff, contents + rel->r_offset); in m32c_elf_relocate_section() 592 bfd_put_8 (input_bfd, (relocation >> 8) & 0xff, contents + rel->r_offset + 1); in m32c_elf_relocate_section() 593 bfd_put_8 (input_bfd, (relocation >> 16) & 0xff, contents + rel->r_offset + 2); in m32c_elf_relocate_section() 601 contents, rel->r_offset, relocation, in m32c_elf_relocate_section() 615 input_bfd, input_section, rel->r_offset); in m32c_elf_relocate_section() 620 (info, name, input_bfd, input_section, rel->r_offset, true); in m32c_elf_relocate_section() [all …]
|