Lines Matching defs:opd
276 /* Since .opd is an array of descriptors and each entry will end up
278 propagate .opd relocs; The dynamic linker should be taught to
279 relocate .opd without reloc entries. */
1468 if (strcmp (symbol->section->name, ".opd") == 0
1809 on removed .opd entries to this section so that the sym is removed. */
1991 /* An array with one entry for each opd function descriptor,
1992 and some spares since opd entries may be either 16 or 24 bytes. */
1996 /* Points to the function code section for local opd entries. */
1999 /* After editing .opd, adjust references to opd local syms. */
2010 } opd;
2074 return &ppc64_elf_section_data (sec)->u.opd;
2097 /* then .opd symbols. */
2100 if (strcmp (a->section->name, ".opd") == 0
2101 && strcmp (b->section->name, ".opd") != 0)
2103 if (strcmp (a->section->name, ".opd") != 0
2104 && strcmp (b->section->name, ".opd") == 0)
2239 asection *opd = NULL;
2248 opd = bfd_get_section_by_name (abfd, ".opd");
2249 if (opd == NULL && abi == 1)
2259 if (opd != NULL)
2292 synthetic_opd = opd;
2318 /* Note that here and in compare_symbols we can't compare opd and
2323 && strcmp (syms[i]->section->name, ".opd") == 0)
2341 if (strcmp (syms[i]->section->name, ".opd") != 0)
2365 relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
2369 if (!(*slurp_relocs) (abfd, opd, static_syms, false))
2376 for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
2380 while (r < opd->relocation + relcount
2381 && r->address < syms[i]->value + opd->vma)
2384 if (r == opd->relocation + relcount)
2387 if (r->address != syms[i]->value + opd->vma)
2414 for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
2418 while (r < opd->relocation + relcount
2419 && r->address < syms[i]->value + opd->vma)
2422 if (r == opd->relocation + relcount)
2425 if (r->address != syms[i]->value + opd->vma)
2463 if (opd != NULL
2464 && ((opd->flags & SEC_HAS_CONTENTS) == 0
2465 || !bfd_malloc_and_get_section (abfd, opd, &contents)))
2480 if (syms[i]->value > opd->size - 8)
2592 if (syms[i]->value > opd->size - 8)
2748 . .section .opd
2757 unsurprisingly just goes to .foo and the .opd information is unused.
2759 different: The call goes via a plt call stub, the opd information gets
2781 an R_PPC64_JMP_SLOT reloc against foo. The dynamic linker does the opd
2855 .opd section. gcc uses the descriptor directly rather than going
3152 /* Whether global opd/toc sym has been adjusted or not.
3154 should be set for all globals defined in any opd/toc section. */
4250 /* Fix function descriptor symbols defined in .opd sections to be
4263 && strcmp ((*sec)->name, ".opd") == 0)
4271 /* If the symbol is a function defined in .opd, and the function
4459 /* Set up opd section info and abiversion for IBFD, and process list
4467 asection *opd = bfd_get_section_by_name (ibfd, ".opd");
4469 if (opd != NULL && opd->size != 0)
4471 if (ppc64_elf_section_data (opd)->sec_type == sec_normal)
4472 ppc64_elf_section_data (opd)->sec_type = sec_opd;
4473 else if (ppc64_elf_section_data (opd)->sec_type != sec_opd)
4481 _bfd_error_handler (_("%pB .opd not allowed in ABI version %d"),
4492 as ELFv2 and above flagged those with .opd as ELFv1.
4506 if (opd != NULL && opd->size != 0
4508 && (opd->flags & SEC_RELOC) != 0
4509 && opd->reloc_count != 0
4510 && !bfd_is_abs_section (opd->output_section)
4513 /* Garbage collection needs some extra help with .opd sections.
4515 relocs in .opd, as that would keep all functions. Instead,
4516 if we reference an .opd symbol (a function descriptor), we
4525 amt = OPD_NDX (opd->size) * sizeof (*opd_sym_map);
4529 ppc64_elf_section_data (opd)->u.opd.func_sec = opd_sym_map;
4530 relocs = _bfd_elf_link_read_relocs (ibfd, opd, NULL, NULL,
4535 rel_end = relocs + opd->reloc_count - 1;
4552 if (elf_section_data (opd)->relocs != relocs)
4558 if (s != NULL && s != opd)
4562 if (elf_section_data (opd)->relocs != relocs)
4617 || bfd_get_section_by_name (sec->owner, ".opd") != NULL)
5363 /* Don't propagate .opd relocs. */
5567 bfd_byte *contents = ppc64_elf_section_data (opd_sec)->u.opd.u.contents;
5574 ppc64_elf_section_data (opd_sec)->u.opd.u.contents = contents;
5611 relocs = ppc64_elf_section_data (opd_sec)->u.opd.u.relocs;
5618 /* Go find the opd reloc at the sym address. */
5749 if (strcmp (sym->section->name, ".opd") == 0)
5751 struct _opd_sec_data *opd = get_opd_info (sym->section);
5754 if (opd != NULL
5755 && opd->adjust != NULL
5761 long adjust = opd->adjust[OPD_NDX (symval)];
5770 /* An old ABI binary with dot-syms has a size of 24 on the .opd
5896 /* Mark all our entry sym sections, both opd and code section. */
6009 /* Syms return NULL if we're marking .opd, so we avoid marking all
6010 function sections, as all functions are referenced in .opd. */
6050 /* They also mark their opd section. */
6075 struct _opd_sec_data *opd;
6078 opd = get_opd_info (rsec);
6079 if (opd != NULL && opd->func_sec != NULL)
6083 rsec = opd->func_sec[OPD_NDX (sym->st_value + rel->r_addend)];
7135 /* Adjust all global syms defined in opd sections. In gcc generated
7143 struct _opd_sec_data *opd;
7157 opd = get_opd_info (sym_sec);
7158 if (opd != NULL && opd->adjust != NULL)
7160 long adjust = opd->adjust[OPD_NDX (eh->elf.root.u.def.value)];
7389 struct _opd_sec_data *opd;
7396 sec = bfd_get_section_by_name (ibfd, ".opd");
7422 determine whether we need to edit this opd section. */
7436 /* .opd contains an array of 16 or 24 byte entries. We're
7443 /* If someone messes with .opd alignment then after a
7444 "ld -r" we might have padding in the middle of .opd.
7446 something silly in .opd with the assembler. No .opd
7450 (_("%pB: .opd is not a regular array of opd entries"), ibfd);
7460 (_("%pB: unexpected reloc type %u in .opd section"),
7482 (_("%pB: undefined sym `%s' in .opd section"),
7488 /* opd entries are always for functions defined in the
7544 opd = &ppc64_elf_section_data (sec)->u.opd;
7545 opd->adjust = bfd_zalloc (sec->owner, amt);
7546 if (opd->adjust == NULL)
7549 /* This seems a waste of time as input .opd sections are all
7552 the third word of .opd entries. */
7605 /* See if the .opd entry is full 24 byte or
7641 opd->adjust[OPD_NDX (rel->r_offset)] = -1;
7663 /* We'll be keeping this opd entry. */
7669 this location in the opd section. It is
7686 opd->adjust[OPD_NDX (rel->r_offset)] = adjust;
7698 new opd entries. */
7741 /* If we are doing a final link and the last .opd entry is just 16 byte
8267 STT_TLS. So no need for .opd local sym adjust. */
11655 /* H is an opd symbol. The addend must be zero, and the
11677 opd entry. */
11681 asection *opd = stub_entry->h->elf.root.u.def.section;
11684 if (strcmp (opd->name, ".opd") != 0
11685 || opd->reloc_count != 0)
11688 (_("%P: cannot find opd entry toc for `%pT'\n"),
11693 if (!bfd_get_section_contents (opd->owner, opd, buf, opd_off + 8, 8))
11695 r2off = bfd_get_64 (opd->owner, buf);
13086 struct _opd_sec_data *opd;
13144 /* If this branch reloc uses an opd sym, find the code section. */
13145 opd = get_opd_info (sym_sec);
13146 if (opd != NULL)
13148 if (h == NULL && opd->adjust != NULL)
13152 adjust = opd->adjust[OPD_NDX (sym_value)];
13788 struct _opd_sec_data *opd;
13793 opd = get_opd_info (sym_sec);
13794 if (opd != NULL)
13894 struct _opd_sec_data *opd;
14034 opd = get_opd_info (sym_sec);
14035 if (opd != NULL)
14039 if (hash == NULL && opd->adjust != NULL)
14041 long adjust = opd->adjust[OPD_NDX (sym_value)];
15405 if (strcmp (".opd", sec->name) == 0)
15614 struct _opd_sec_data *opd;
15621 opd = get_opd_info (sec);
15622 if (opd != NULL && opd->adjust != NULL)
15624 long adjust = opd->adjust[OPD_NDX (sym->st_value
15630 /* If this is a relocation against the opd section sym
15631 and we have edited .opd, adjust the reloc addend so
15633 If it is a reloc against some other .opd symbol,
15654 && strcmp (sec->name, ".opd") == 0)
15660 appropriate input .opd section, so that a branch to
15662 by the opd entry. */
16578 /* The branch destination is the value of the opd entry. */
17449 or this is an opd section reloc which must point
17456 /* Lie about opd entries. This case occurs
17464 In these cases we won't use the opd
17478 /* We need to relocate .opd contents for ld.so.
17597 case of .opd where the contents might be accessed
18048 ? " (OPD)" : " (stub)"));
18108 ppc64_elf_section_data (input_section)->u.opd.u.relocs = rel;
18116 /* Adjust the value of any local symbols in opd sections. */
18125 struct _opd_sec_data *opd;
18132 opd = get_opd_info (input_sec);
18133 if (opd == NULL || opd->adjust == NULL)
18140 adjust = opd->adjust[OPD_NDX (value)];
18289 s = bfd_get_section_by_name (output_bfd, ".opd");
18304 s = bfd_get_section_by_name (output_bfd, ".opd");
18422 for (asection *opd = bfd_get_section_by_name (abfd, ".opd");
18423 opd != NULL;
18424 opd = bfd_get_next_section_by_name (NULL, opd))
18425 if (opd->reloc_count == 0)
18426 free (ppc64_elf_section_data (opd)->u.opd.u.contents);