aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em10
1 files changed, 8 insertions, 2 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 2888008..1646d2e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1915,17 +1915,23 @@ cat >>e${EMULATION_NAME}.c <<EOF
char *end;
config.maxpagesize = strtoul (optarg + 14, &end, 0);
- if (*end)
+ if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
einfo (_("%P%F: invalid maxium page size \`%s'\n"),
optarg + 14);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_maxpagesize (default_target, config.maxpagesize);
}
else if (CONST_STRNEQ (optarg, "common-page-size="))
{
char *end;
config.commonpagesize = strtoul (optarg + 17, &end, 0);
- if (*end)
+ if (*end
+ || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
einfo (_("%P%F: invalid common page size \`%s'\n"),
optarg + 17);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_commonpagesize (default_target,
+ config.commonpagesize);
}
/* What about the other Solaris -z options? FIXME. */
break;