ld: adjust PE base relocations testcase
authorJan Beulich <jbeulich@suse.com>
Tue, 9 Mar 2021 11:40:13 +0000 (12:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Mar 2021 11:40:13 +0000 (12:40 +0100)
mcore-pe and sh-pe pointed out that the testcase added by 6fa7408d72b3
("ld: don't generate base relocations in PE output for absolute
symbols") wasn't quite generic enough yet. Copy entry point stuff from
another test and increase alignment to also cover targets with a page
size lower than 4k.

Despite all of this the test needs to be xfail-ed for mcore, as this
target isn't included in the set getting DLL_SUPPORT enabled in
emultempl/pe.em, and hence no base relocations get generated there
(yet).

ld/ChangeLog
ld/testsuite/ld-pe/reloc.d
ld/testsuite/ld-pe/reloc.s

index 1b98c81a6a8a3e3330f9c494f28bc213b7bb49c5..c51332ad5c67a6e3417c8f7bc308404ba2c4c9f3 100644 (file)
@@ -1,3 +1,9 @@
+2021-03-09  Jan Beulich  <jbeulich@suse.com>
+
+       * testsuite/ld-pe/reloc.s: Add entry point symbols. Increase
+       alignment to 4k.
+       * testsuite/ld-pe/reloc.d: xfail for mcore.
+
 2021-03-09  Jan Beulich  <jbeulich@suse.com>
 
        * testsuite/ld-scripts/alignof.exp,
index 55888c3bdf122eb326c684324756439727b4eef3..eab8dfb9b026de40128077485be05d28a517b092 100644 (file)
@@ -1,6 +1,7 @@
 #name: PE base relocations
 #ld: --enable-reloc-section
 #objdump: -p
+#xfail: mcore-*-*
 
 .*:     file format .*
 
index 3ed2e02e70de0f42a85d29dec01db6de9897ca77..d1ea0a7817fd491faa7d763fd3647d9b9f54230b 100644 (file)
@@ -1,5 +1,12 @@
+       .text
+       .global _start
+       .global _mainCRTStartup
+_start:
+_mainCRTStartup:
+       .byte 1
+
        .data
-       .p2align 4
+       .p2align 12
 start:
        .dc.a   __image_base__
        .dc.a   start
This page took 0.027737 seconds and 4 git commands to generate.