aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-10-20 10:57:33 +0000
committerAlan Modra <amodra@gmail.com>2008-10-20 10:57:33 +0000
commit58217f292890a480df33735fd9292a4173f6b210 (patch)
treec1a1f72426c417df209647f252225d266ca995ca /bfd/elflink.c
parentbef264833bf5549bfef8e3495d514ff4a3b72e9f (diff)
downloadfsf-binutils-gdb-58217f292890a480df33735fd9292a4173f6b210.zip
fsf-binutils-gdb-58217f292890a480df33735fd9292a4173f6b210.tar.gz
fsf-binutils-gdb-58217f292890a480df33735fd9292a4173f6b210.tar.bz2
* elflink.c (bfd_elf_final_link): Move code reading relocs to..
* elf32-spu.c (spu_elf_count_relocs): ..here. Adjust params. * elf-bfd.h (struct elf_backend_data): Update elf_backend_count_relocs params.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index d39ec68..f2015ee 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -10095,22 +10095,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (info->relocatable || info->emitrelocations)
reloc_count = sec->reloc_count;
else if (bed->elf_backend_count_relocs)
- {
- Elf_Internal_Rela * relocs;
-
- relocs = _bfd_elf_link_read_relocs (sec->owner, sec,
- NULL, NULL,
- info->keep_memory);
-
- if (relocs != NULL)
- {
- reloc_count
- = (*bed->elf_backend_count_relocs) (sec, relocs);
-
- if (elf_section_data (sec)->relocs != relocs)
- free (relocs);
- }
- }
+ reloc_count = (*bed->elf_backend_count_relocs) (info, sec);
if (sec->rawsize > max_contents_size)
max_contents_size = sec->rawsize;