From 1a23a9e6139ff1d1b19d242cf9c47f06c326df08 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 29 Jun 2004 14:13:47 +0000 Subject: bfd/ * elf64-mmix.c (mmix_set_relaxable_size): Save original size in rawsize. (mmix_elf_perform_relocation): Adjust for above change. (mmix_elf_relocate_section): Likewise. (mmix_elf_relax_section): Likewise. Use output_section->rawsize. (mmix_elf_get_section_contents): Delete. (bfd_elf64_get_section_contents): Delete. (mmix_elf_relocate_section): Zero stub area. * linker.c (default_indirect_link_order): Alloc max of section size and rawsize. * simple.c (bfd_simple_get_relocated_section_contents): Likewise. * section.c (bfd_malloc_and_get_section): Likewise. (struct bfd_section): Update rawsize comment. * bfd-in2.h: Regenerate. ld/ * ldlang.c (lang_reset_memory_regions): Save last relax pass section size in rawsize. --- bfd/linker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bfd/linker.c') diff --git a/bfd/linker.c b/bfd/linker.c index 6ad32ba..10b4467 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2756,7 +2756,9 @@ default_indirect_link_order (bfd *output_bfd, } /* Get and relocate the section contents. */ - sec_size = input_section->size; + sec_size = (input_section->rawsize > input_section->size + ? input_section->rawsize + : input_section->size); contents = bfd_malloc (sec_size); if (contents == NULL && sec_size != 0) goto error_return; -- cgit v1.1