X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felfxx-ia64.c;h=535b1bc23b1ecb3ec1269ab24832328a12a6fb4f;hb=2ea37f1c66300870024a9a9393c4b19337363d8b;hp=5aa1a0ab3910710f27eb767b78b4293844c3f7ea;hpb=4d21221c081329397e80596c246e03c8472a21e2;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 5aa1a0ab39..535b1bc23b 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -4894,24 +4894,11 @@ elfNN_ia64_relocate_section (bfd *output_bfd, case R_IA64_SEGREL64MSB: case R_IA64_SEGREL64LSB: { - struct elf_segment_map *m; - Elf_Internal_Phdr *p; - /* Find the segment that contains the output_section. */ - for (m = elf_tdata (output_bfd)->segment_map, - p = elf_tdata (output_bfd)->phdr; - m != NULL; - m = m->next, p++) - { - int i; - for (i = m->count - 1; i >= 0; i--) - if (m->sections[i] == input_section->output_section) - break; - if (i >= 0) - break; - } + Elf_Internal_Phdr *p = _bfd_elf_find_segment_containing_section + (input_bfd, input_section->output_section); - if (m == NULL) + if (p == NULL) { r = bfd_reloc_notsupported; }