* elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
authorHans-Peter Nilsson <hp@axis.com>
Thu, 14 Nov 2002 01:32:28 +0000 (01:32 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Thu, 14 Nov 2002 01:32:28 +0000 (01:32 +0000)
For bpo_gregs_section->contents, allocate _raw_size, not
_cooked_size.

bfd/ChangeLog
bfd/elf64-mmix.c

index fb0460cceff17747b4998a75ba5d3a349b8570fb..89522999b6d51970ce01d39b0693dc1ab89970d6 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
+       For bpo_gregs_section->contents, allocate _raw_size, not
+       _cooked_size.
+
 2002-11-13  Klee Dienes  <kdienes@apple.com>
 
        * config.bfd: Add entries for powerpc-*-darwin and cousins.
index 8b76f34e03818296fc53080412b1debef8880fa5..939d12f7b3883c21ed146eca8a7ef7b6c9f53826 100644 (file)
@@ -2170,8 +2170,11 @@ _bfd_mmix_finalize_linker_allocated_gregs (abfd, link_info)
 
   n_gregs = gregdata->n_allocated_bpo_gregs;
 
+  /* We need to have a _raw_size contents even though there's only
+     _cooked_size worth of data, since the generic relocation machinery
+     will allocate and copy that much temporarily.  */
   bpo_gregs_section->contents
-    = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->_cooked_size);
+    = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->_raw_size);
   if (contents == NULL)
     return false;