aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-05-26 14:10:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-05-26 14:10:15 +0000
commitc8ce57109cba194742fc1d0b6f953cf535571750 (patch)
treedd34e730e8b738fdbdeb12530886b8185358a2a3 /ld/ldexp.c
parentf79e2745b210313ede58d9509e718f0e2506e045 (diff)
downloadgdb-c8ce57109cba194742fc1d0b6f953cf535571750.zip
gdb-c8ce57109cba194742fc1d0b6f953cf535571750.tar.gz
gdb-c8ce57109cba194742fc1d0b6f953cf535571750.tar.bz2
Warn if value of SEGMENT_START isn't multiple of maximum page size.
ld/ 2010-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/11628 * ldexp.c (fold_binary): Warn if value of SEGMENT_START isn't multiple of maximum page size. ld/testsuite/ 2010-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/11628 * ld-elf/textaddr3.d: New. * ld-elf/textaddr4.d: Likewise. * ld-elf/textaddr5.d: Likewise. * ld-elf/textaddr6.d: Likewise. * ld-elf/textaddr7.d: Likewise.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 34d9eab..c0ca818 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -299,6 +299,11 @@ fold_binary (etree_type *tree)
for (seg = segments; seg; seg = seg->next)
if (strcmp (seg->name, segment_name) == 0)
{
+ if (!seg->used
+ && config.magic_demand_paged
+ && (seg->value % config.maxpagesize) != 0)
+ einfo (_("%P: warning: address of `%s' isn't multiple of maximum page size\n"),
+ segment_name);
seg->used = TRUE;
expld.result.value = seg->value;
expld.result.str = NULL;