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. */
1476 if (strcmp (symbol->section->name, ".opd") == 0
1817 on removed .opd entries to this section so that the sym is removed. */
1999 /* An array with one entry for each opd function descriptor,
2000 and some spares since opd entries may be either 16 or 24 bytes. */
2004 /* Points to the function code section for local opd entries. */
2007 /* After editing .opd, adjust references to opd local syms. */
2018 } opd;
2082 return &ppc64_elf_section_data (sec)->u.opd;
2105 /* then .opd symbols. */
2108 if (strcmp (a->section->name, ".opd") == 0
2109 && strcmp (b->section->name, ".opd") != 0)
2111 if (strcmp (a->section->name, ".opd") != 0
2112 && strcmp (b->section->name, ".opd") == 0)
2247 asection *opd = NULL;
2256 opd = bfd_get_section_by_name (abfd, ".opd");
2257 if (opd == NULL && abi == 1)
2267 if (opd != NULL)
2300 synthetic_opd = opd;
2326 /* Note that here and in compare_symbols we can't compare opd and
2331 opd") == 0)
2349 if (strcmp (syms[i]->section->name, ".opd") != 0)
2373 relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
2377 if (!(*slurp_relocs) (abfd, opd, static_syms, false))
2384 for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
2388 while (r < opd->relocation + relcount
2389 && r->address < syms[i]->value + opd->vma)
2392 if (r == opd->relocation + relcount)
2395 if (r->address != syms[i]->value + opd->vma)
2422 for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
2426 while (r < opd->relocation + relcount
2427 && r->address < syms[i]->value + opd->vma)
2430 if (r == opd->relocation + relcount)
2433 if (r->address != syms[i]->value + opd->vma)
2471 if (opd != NULL
2472 && ((opd->flags & SEC_HAS_CONTENTS) == 0
2473 || !bfd_malloc_and_get_section (abfd, opd, &contents)))
2488 if (syms[i]->value > opd->size - 8)
2600 if (syms[i]->value > opd->size - 8)
2756 . .section .opd
2765 unsurprisingly just goes to .foo and the .opd information is unused.
2767 different: The call goes via a plt call stub, the opd information gets
2789 an R_PPC64_JMP_SLOT reloc against foo. The dynamic linker does the opd
2863 .opd section. gcc uses the descriptor directly rather than going
3160 /* Whether global opd/toc sym has been adjusted or not.
3162 should be set for all globals defined in any opd/toc section. */
4257 /* Fix function descriptor symbols defined in .opd sections to be
4270 && strcmp ((*sec)->name, ".opd") == 0)
4278 /* If the symbol is a function defined in .opd, and the function
4466 /* Set up opd section info and abiversion for IBFD, and process list
4474 asection *opd = bfd_get_section_by_name (ibfd, ".opd");
4476 if (opd != NULL && opd->size != 0)
4478 if (ppc64_elf_section_data (opd)->sec_type == sec_normal)
4479 ppc64_elf_section_data (opd)->sec_type = sec_opd;
4480 else if (ppc64_elf_section_data (opd)->sec_type != sec_opd)
4488 _bfd_error_handler (_("%pB .opd not allowed in ABI version %d"),
4499 as ELFv2 and above flagged those with .opd as ELFv1.
4513 if (opd != NULL && opd->size != 0
4515 && (opd->flags & SEC_RELOC) != 0
4516 && opd->reloc_count != 0
4517 && !bfd_is_abs_section (opd->output_section)
4520 /* Garbage collection needs some extra help with .opd sections.
4522 relocs in .opd, as that would keep all functions. Instead,
4523 if we reference an .opd symbol (a function descriptor), we
4532 amt = OPD_NDX (opd->size) * sizeof (*opd_sym_map);
4536 ppc64_elf_section_data (opd)->u.opd.func_sec = opd_sym_map;
4537 relocs = _bfd_elf_link_read_relocs (ibfd, opd, NULL, NULL,
4542 rel_end = relocs + opd->reloc_count - 1;
4559 if (elf_section_data (opd)->relocs != relocs)
4565 if (s != NULL && s != opd)
4569 if (elf_section_data (opd)->relocs != relocs)
4624 || bfd_get_section_by_name (sec->owner, ".opd") != NULL)
5370 /* Don't propagate .opd relocs. */
5574 bfd_byte *contents = ppc64_elf_section_data (opd_sec)->u.opd.u.contents;
5581 ppc64_elf_section_data (opd_sec)->u.opd.u.contents = contents;
5618 relocs = ppc64_elf_section_data (opd_sec)->u.opd.u.relocs;
5625 /* Go find the opd reloc at the sym address. */
5751 if (strcmp (sym->section->name, ".opd") == 0)
5753 struct _opd_sec_data *opd = get_opd_info (sym->section);
5756 if (opd != NULL
5757 && opd->adjust != NULL
5763 long adjust = opd->adjust[OPD_NDX (symval)];
5772 /* An old ABI binary with dot-syms has a size of 24 on the .opd
5898 /* Mark all our entry sym sections, both opd and code section. */
6011 /* Syms return NULL if we're marking .opd, so we avoid marking all
6012 function sections, as all functions are referenced in .opd. */
6052 /* They also mark their opd section. */
6077 struct _opd_sec_data *opd;
6080 opd = get_opd_info (rsec);
6081 if (opd != NULL && opd->func_sec != NULL)
6085 rsec = opd->func_sec[OPD_NDX (sym->st_value + rel->r_addend)];
7136 /* Adjust all global syms defined in opd sections. In gcc generated
7144 struct _opd_sec_data *opd;
7158 opd = get_opd_info (sym_sec);
7159 if (opd != NULL && opd->adjust != NULL)
7161 long adjust = opd->adjust[OPD_NDX (eh->elf.root.u.def.value)];
7390 struct _opd_sec_data *opd;
7397 sec = bfd_get_section_by_name (ibfd, ".opd");
7423 determine whether we need to edit this opd section. */
7437 /* .opd contains an array of 16 or 24 byte entries. We're
7444 /* If someone messes with .opd alignment then after a
7445 "ld -r" we might have padding in the middle of .opd.
7447 something silly in .opd with the assembler. No .opd
7451 (_("%pB: .opd is not a regular array of opd entries"), ibfd);
7461 (_("%pB: unexpected reloc type %u in .opd section"),
7483 (_("%pB: undefined sym `%s' in .opd section"),
7489 /* opd entries are always for functions defined in the
7545 opd = &ppc64_elf_section_data (sec)->u.opd;
7546 opd->adjust = bfd_zalloc (sec->owner, amt);
7547 if (opd->adjust == NULL)
7550 /* This seems a waste of time as input .opd sections are all
7553 the third word of .opd entries. */
7606 /* See if the .opd entry is full 24 byte or
7642 opd->adjust[OPD_NDX (rel->r_offset)] = -1;
7664 /* We'll be keeping this opd entry. */
7670 this location in the opd section. It is
7687 opd->adjust[OPD_NDX (rel->r_offset)] = adjust;
7699 new opd entries. */
7742 /* If we are doing a final link and the last .opd entry is just 16 byte
8268 STT_TLS. So no need for .opd local sym adjust. */
11652 /* H is an opd symbol. The addend must be zero, and the
11674 opd entry. */
11678 asection *opd = stub_entry->h->elf.root.u.def.section;
11681 if (strcmp (opd->name, ".opd") != 0
11682 || opd->reloc_count != 0)
11685 (_("%P: cannot find opd entry toc for `%pT'\n"),
11690 if (!bfd_get_section_contents (opd->owner, opd, buf, opd_off + 8, 8))
11692 r2off = bfd_get_64 (opd->owner, buf);
13083 struct _opd_sec_data *opd;
13141 /* If this branch reloc uses an opd sym, find the code section. */
13142 opd = get_opd_info (sym_sec);
13143 if (opd != NULL)
13145 if (h == NULL && opd->adjust != NULL)
13149 adjust = opd->adjust[OPD_NDX (sym_value)];
13785 struct _opd_sec_data *opd;
13790 opd = get_opd_info (sym_sec);
13791 if (opd != NULL)
13892 struct _opd_sec_data *opd;
14032 opd = get_opd_info (sym_sec);
14033 if (opd != NULL)
14037 if (hash == NULL && opd->adjust != NULL)
14039 long adjust = opd->adjust[OPD_NDX (sym_value)];
15395 if (strcmp (".opd", sec->name) == 0)
15604 struct _opd_sec_data *opd;
15611 opd = get_opd_info (sec);
15612 if (opd != NULL && opd->adjust != NULL)
15614 long adjust = opd->adjust[OPD_NDX (sym->st_value
15620 /* If this is a relocation against the opd section sym
15621 and we have edited .opd, adjust the reloc addend so
15623 If it is a reloc against some other .opd symbol,
15644 && strcmp (sec->name, ".opd") == 0)
15650 appropriate input .opd section, so that a branch to
15652 by the opd entry. */
16564 /* The branch destination is the value of the opd entry. */
17429 or this is an opd section reloc which must point
17436 /* Lie about opd entries. This case occurs
17444 In these cases we won't use the opd
17458 /* We need to relocate .opd contents for ld.so.
17577 case of .opd where the contents might be accessed
18028 ? " (OPD)" : " (stub)"));
18096 ppc64_elf_section_data (input_section)->u.opd.u.relocs = rel;
18104 /* Adjust the value of any local symbols in opd sections. */
18113 struct _opd_sec_data *opd;
18120 opd = get_opd_info (input_sec);
18121 if (opd == NULL || opd->adjust == NULL)
18128 adjust = opd->adjust[OPD_NDX (value)];
18277 s = bfd_get_section_by_name (output_bfd, ".opd");
18292 s = bfd_get_section_by_name (output_bfd, ".opd");
18410 for (asection *opd = bfd_get_section_by_name (abfd, ".opd");
18411 opd != NULL;
18412 opd = bfd_get_next_section_by_name (NULL, opd))
18413 if (opd->reloc_count == 0)
18414 free (ppc64_elf_section_data (opd)->u.opd.u.contents);