From: H.J. Lu Date: Fri, 19 Jan 2007 15:06:27 +0000 (+0000) Subject: ld/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b81428656759ee87a5619f8495c04123ec71d582;p=binutils-gdb.git ld/ 2007-01-19 Jakub Jelinek H.J. Lu * 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 * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor bfd_emul_set_commonpagesize. ld/testsuite/ 2007-01-19 H.J. Lu * ld-elf/maxpage3.t: New file. * ld-elf/maxpage3a.d: Likewise. * ld-elf/maxpage3b.d: Likewise. * ld-elf/maxpage3c.d: Likewise. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 8bf6eca77b3..4fb8e5545c0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,15 @@ +2007-01-19 Jakub Jelinek + H.J. Lu + + * 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 + + * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor + bfd_emul_set_commonpagesize. + 2007-01-19 H.J. Lu * NEWS: Mention --default-script/-dT. diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 28880084fa8..1646d2ebf3d 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1915,17 +1915,23 @@ cat >>e${EMULATION_NAME}.c < + + * 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 * ld-scripts/default-script.exp: New file. diff --git a/ld/testsuite/ld-elf/maxpage3.t b/ld/testsuite/ld-elf/maxpage3.t new file mode 100644 index 00000000000..556dcd533c8 --- /dev/null +++ b/ld/testsuite/ld-elf/maxpage3.t @@ -0,0 +1,7 @@ +SECTIONS +{ + .text : {*(.text)} + . = ALIGN(CONSTANT (MAXPAGESIZE)); + .data : {*(.data)} + /DISCARD/ : {*(*)} +} diff --git a/ld/testsuite/ld-elf/maxpage3a.d b/ld/testsuite/ld-elf/maxpage3a.d new file mode 100644 index 00000000000..0e46b6bb3e8 --- /dev/null +++ b/ld/testsuite/ld-elf/maxpage3a.d @@ -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 diff --git a/ld/testsuite/ld-elf/maxpage3b.d b/ld/testsuite/ld-elf/maxpage3b.d new file mode 100644 index 00000000000..4bee0ec447c --- /dev/null +++ b/ld/testsuite/ld-elf/maxpage3b.d @@ -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 diff --git a/ld/testsuite/ld-elf/maxpage3c.d b/ld/testsuite/ld-elf/maxpage3c.d new file mode 100644 index 00000000000..cdc3eaffe54 --- /dev/null +++ b/ld/testsuite/ld-elf/maxpage3c.d @@ -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