aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-01-19 15:06:27 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-01-19 15:06:27 +0000
commitb81428656759ee87a5619f8495c04123ec71d582 (patch)
tree59636355e4dc3a3b04e1d3c7ee82c85bec953f95 /ld/emultempl
parent14be856495aa9995b691665ac113d84277439feb (diff)
downloadgdb-b81428656759ee87a5619f8495c04123ec71d582.zip
gdb-b81428656759ee87a5619f8495c04123ec71d582.tar.gz
gdb-b81428656759ee87a5619f8495c04123ec71d582.tar.bz2
ld/
2007-01-19 Jakub Jelinek <jakub@redhat.com> H.J. Lu <hongjiu.lu@intel.com> * emultempl/elf32.em (handle_option): Make sure -z max-page-size or -z common-page-size argument is a power of 2. Call bfd_emul_set_maxpagesize and bfd_emul_set_commonpagesize. 2007-01-19 H.J. Lu <hongjiu.lu@intel.com> * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor bfd_emul_set_commonpagesize. ld/testsuite/ 2007-01-19 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/maxpage3.t: New file. * ld-elf/maxpage3a.d: Likewise. * ld-elf/maxpage3b.d: Likewise. * ld-elf/maxpage3c.d: Likewise.
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;