diff options
author | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:01:54 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-12-31 11:01:54 +0000 |
commit | 2ea37f1c66300870024a9a9393c4b19337363d8b (patch) | |
tree | c2070f32ea83ec065ee9d1d41f4c2616feb185bc /bfd/elfxx-ia64.c | |
parent | 4d21221c081329397e80596c246e03c8472a21e2 (diff) | |
download | gdb-2ea37f1c66300870024a9a9393c4b19337363d8b.zip gdb-2ea37f1c66300870024a9a9393c4b19337363d8b.tar.gz gdb-2ea37f1c66300870024a9a9393c4b19337363d8b.tar.bz2 |
* elf.c (_bfd_elf_find_segment_containing_section): New function:
Scan the segment map looking for the segment containing a
specified function.
* elf-bfd.h: Prototype the new function.
* elf-hppa.h (elf_hppa_osec_to_segment): Delete.
(elf_hppa_record_segment_addrs): Use new function.
* elf32-bfin.c (_bfdfdpic_osec_to_segment): Use new function.
* elf32-frv.c (_frvfdpic_osec_to_segment): Use new function.
* elf32-hppa.c (hppa_record_segment_addr): Use new function.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Use new function.
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; } |