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.
This commit is contained in:
parent
14be856495
commit
b814286567
8 changed files with 67 additions and 9 deletions
12
ld/ChangeLog
12
ld/ChangeLog
|
@ -1,3 +1,15 @@
|
|||
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.
|
||||
|
||||
2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* NEWS: Mention --default-script/-dT.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -344,13 +344,6 @@ main (int argc, char **argv)
|
|||
if (config.hash_table_size != 0)
|
||||
bfd_hash_set_default_size (config.hash_table_size);
|
||||
|
||||
if (config.maxpagesize != 0)
|
||||
bfd_emul_set_maxpagesize (default_target, config.maxpagesize);
|
||||
|
||||
if (config.commonpagesize != 0)
|
||||
bfd_emul_set_commonpagesize (default_target,
|
||||
config.commonpagesize);
|
||||
|
||||
ldemul_set_symbols ();
|
||||
|
||||
if (link_info.relocatable)
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
||||
2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* ld-scripts/default-script.exp: New file.
|
||||
|
|
7
ld/testsuite/ld-elf/maxpage3.t
Normal file
7
ld/testsuite/ld-elf/maxpage3.t
Normal file
|
@ -0,0 +1,7 @@
|
|||
SECTIONS
|
||||
{
|
||||
.text : {*(.text)}
|
||||
. = ALIGN(CONSTANT (MAXPAGESIZE));
|
||||
.data : {*(.data)}
|
||||
/DISCARD/ : {*(*)}
|
||||
}
|
11
ld/testsuite/ld-elf/maxpage3a.d
Normal file
11
ld/testsuite/ld-elf/maxpage3a.d
Normal file
|
@ -0,0 +1,11 @@
|
|||
#source: maxpage1.s
|
||||
#ld: -z max-page-size=0x10000000 -T maxpage3.t
|
||||
#readelf: -lS --wide
|
||||
#target: *-*-linux*
|
||||
|
||||
#...
|
||||
\[[ 0-9]+\] \.data[ \t]+PROGBITS[ \t]+0*10000000[ \t]+[ \t0-9a-f]+WA?.*
|
||||
#...
|
||||
LOAD+.*0x10000000
|
||||
LOAD+.*0x10000000
|
||||
#pass
|
10
ld/testsuite/ld-elf/maxpage3b.d
Normal file
10
ld/testsuite/ld-elf/maxpage3b.d
Normal file
|
@ -0,0 +1,10 @@
|
|||
#source: maxpage1.s
|
||||
#ld: -T maxpage3.t -z max-page-size=0x10000000
|
||||
#readelf: -lS --wide
|
||||
#target: x86_64-*-linux*
|
||||
|
||||
#...
|
||||
\[[ 0-9]+\] \.data[ \t]+PROGBITS[ \t]+0*200000[ \t]+[ \t0-9a-f]+WA?.*
|
||||
#...
|
||||
LOAD+.*0x10000000
|
||||
#pass
|
12
ld/testsuite/ld-elf/maxpage3c.d
Normal file
12
ld/testsuite/ld-elf/maxpage3c.d
Normal file
|
@ -0,0 +1,12 @@
|
|||
#source: maxpage1.s
|
||||
#as: --32
|
||||
#ld: -m elf_i386 -z max-page-size=0x10000000 -T maxpage3.t
|
||||
#readelf: -lS --wide
|
||||
#target: x86_64-*-linux*
|
||||
|
||||
#...
|
||||
\[[ 0-9]+\] \.data[ \t]+PROGBITS[ \t]+0*10000000[ \t]+[ \t0-9a-f]+WA?.*
|
||||
#...
|
||||
LOAD+.*0x10000000
|
||||
LOAD+.*0x10000000
|
||||
#pass
|
Loading…
Reference in a new issue