diff options
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r-- | bfd/elfxx-ia64.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 5aa1a0a..535b1bc 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; } |