summaryrefslogtreecommitdiff
path: root/bfd/elf64-mmix.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-mmix.c')
-rw-r--r--bfd/elf64-mmix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 8b76f34e038..939d12f7b38 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -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;