aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-pe
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-03-22 15:52:29 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-03-22 15:52:29 +0000
commit50572669e457b60b8eb8e2a10fcd22d217dc7e09 (patch)
tree8e7179d30424c73170e205c7d60aa59e864f7c78 /ld/testsuite/ld-pe
parent0920dee7bad8a96ae1866b9cd451103d8897abf5 (diff)
downloadgdb-50572669e457b60b8eb8e2a10fcd22d217dc7e09.zip
gdb-50572669e457b60b8eb8e2a10fcd22d217dc7e09.tar.gz
gdb-50572669e457b60b8eb8e2a10fcd22d217dc7e09.tar.bz2
bfd/
2003-03-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/4210 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual address and virtual size of the last section for the image size. ld/testsuite/ 2003-03-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/4210 * ld-pe/image_size.d: New file. * ld-pe/image_size.s: Likewise. * ld-pe/image_size.t: Likewise. * ld-pe/pe.exp: Run image_size.
Diffstat (limited to 'ld/testsuite/ld-pe')
-rw-r--r--ld/testsuite/ld-pe/image_size.d9
-rw-r--r--ld/testsuite/ld-pe/image_size.s8
-rw-r--r--ld/testsuite/ld-pe/image_size.t15
-rw-r--r--ld/testsuite/ld-pe/pe.exp2
4 files changed, 34 insertions, 0 deletions
diff --git a/ld/testsuite/ld-pe/image_size.d b/ld/testsuite/ld-pe/image_size.d
new file mode 100644
index 0000000..6d41fcc
--- /dev/null
+++ b/ld/testsuite/ld-pe/image_size.d
@@ -0,0 +1,9 @@
+#name: PE-COFF SizeOfImage
+#ld: -T image_size.t
+#objdump: -p
+#target: i*86-*-mingw32
+
+.*: file format .*
+#...
+SizeOfImage 00004000
+#...
diff --git a/ld/testsuite/ld-pe/image_size.s b/ld/testsuite/ld-pe/image_size.s
new file mode 100644
index 0000000..3b56d7f
--- /dev/null
+++ b/ld/testsuite/ld-pe/image_size.s
@@ -0,0 +1,8 @@
+ .text
+ .global _start
+_start:
+ .byte 1
+ .global data
+ .data
+data:
+ .byte 2
diff --git a/ld/testsuite/ld-pe/image_size.t b/ld/testsuite/ld-pe/image_size.t
new file mode 100644
index 0000000..f646eca
--- /dev/null
+++ b/ld/testsuite/ld-pe/image_size.t
@@ -0,0 +1,15 @@
+SECTIONS
+{
+ . = SIZEOF_HEADERS;
+ . = ALIGN(__section_alignment__);
+ .text __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :
+ {
+ *(.text)
+ }
+ . = . + 0x1000;
+ .data BLOCK(__section_alignment__) :
+ {
+ *(.data)
+ }
+ /DISCARD/ : { *(.*) }
+}
diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp
index 8657f22..7568f10 100644
--- a/ld/testsuite/ld-pe/pe.exp
+++ b/ld/testsuite/ld-pe/pe.exp
@@ -32,3 +32,5 @@ set pe_tests {
}
run_ld_link_tests $pe_tests
+
+run_dump_test "image_size"