From acac4c696228244258dea61e4b0d50f6e69d929b Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 2 Dec 2008 09:33:12 +0000 Subject: [PATCH] 2008-12-02 Kai Tietz * pe-dll.c (make_runtime_pseudo_reloc): Make symtab big enough to hold relocations. --- ld/ChangeLog | 5 +++++ ld/pe-dll.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 620997a..2adfb63 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2008-12-02 Kai Tietz + + * pe-dll.c (make_runtime_pseudo_reloc): Make symtab big enough to + hold relocations. + 2008-11-27 M R Swami Reddy * emultempl/cr16elf.em (cr16_after_open): New function to handle diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 35836a7..3e67068 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -2284,7 +2284,14 @@ make_runtime_pseudo_reloc (const char *name ATTRIBUTE_UNUSED, bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0); symptr = 0; - symtab = xmalloc (2 * sizeof (asymbol *)); + if (link_info.pei386_runtime_pseudo_reloc == 2) + { + symtab = xmalloc ((runtime_pseudp_reloc_v2_init ? 3 : 6) * sizeof (asymbol *)); + } + else + { + symtab = xmalloc (2 * sizeof (asymbol *)); + } rt_rel = quick_section (abfd, ".rdata_runtime_pseudo_reloc", SEC_HAS_CONTENTS, 2); -- 2.7.4