From 7326c758fd67de5fdaf703c4d24454692e8113e4 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 9 Sep 2010 09:55:03 +0000 Subject: [PATCH] * elflink.c (bfd_elf_final_link): Correct calculation of max_external_reloc_size. --- bfd/ChangeLog | 6 ++++++ bfd/elflink.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ec0659b..acc0813 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2010-09-09 Bernd Schmidt + + bfd/ + * elflink.c (bfd_elf_final_link): Correct calculation of + max_external_reloc_size. + 2010-09-07 Alan Modra Marcus Brinkmann diff --git a/bfd/elflink.c b/bfd/elflink.c index dd48c74..1446885 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -10360,7 +10360,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { size_t ext_size; - ext_size = elf_section_data (sec)->rel_hdr.sh_size; + ext_size = esdi->rel_hdr.sh_size; + if (esdi->rel_hdr2 != NULL) + ext_size += esdi->rel_hdr2->sh_size; + if (ext_size > max_external_reloc_size) max_external_reloc_size = ext_size; if (sec->reloc_count > max_internal_reloc_count) -- 2.7.4