From: Alan Modra Date: Fri, 28 Jul 2023 03:36:17 +0000 (+0930) Subject: ldscripts/empty-address vs. xcoff X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6dfdfde8864d2b6d45b58f8a0cbb9b6caa3939b;p=binutils-gdb.git ldscripts/empty-address vs. xcoff The empty-address tests check that if a section is removed by ld due to being empty then properties of that section don't affect following addresses. The xcoff backend doesn't remove the empty .data section created by empty-address-2* and empty-address-3* for some reason, and therefore fails the test. * testsuite/ld-scripts/empty-address-1.d: Accept more symbols. * testsuite/ld-scripts/empty-address-2a.d: xfail for xcoff. * testsuite/ld-scripts/empty-address-2b.d: Likewise. * testsuite/ld-scripts/empty-address-3a.d: Likewise. * testsuite/ld-scripts/empty-address-3b.d: Likewise. --- diff --git a/ld/testsuite/ld-scripts/empty-address-1.d b/ld/testsuite/ld-scripts/empty-address-1.d index dbaf778024e..210b70f7097 100644 --- a/ld/testsuite/ld-scripts/empty-address-1.d +++ b/ld/testsuite/ld-scripts/empty-address-1.d @@ -5,5 +5,6 @@ 0+0 [AT] _start #... 0+200 [ADT] __data_end +#... 0+200 [ADT] __data_start #pass diff --git a/ld/testsuite/ld-scripts/empty-address-2a.d b/ld/testsuite/ld-scripts/empty-address-2a.d index 4471a1be6a3..a619ea19a07 100644 --- a/ld/testsuite/ld-scripts/empty-address-2a.d +++ b/ld/testsuite/ld-scripts/empty-address-2a.d @@ -1,7 +1,7 @@ #source: empty-address-2.s #ld: -Ttext 0x0000000 -Tdata 0x200 -T empty-address-2a.t #nm: -n -#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-* +#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-* [is_xcoff_format] #... 0+0 T _start #... diff --git a/ld/testsuite/ld-scripts/empty-address-2b.d b/ld/testsuite/ld-scripts/empty-address-2b.d index 8dfe888b63d..c9b97b8b809 100644 --- a/ld/testsuite/ld-scripts/empty-address-2b.d +++ b/ld/testsuite/ld-scripts/empty-address-2b.d @@ -1,7 +1,7 @@ #source: empty-address-2.s #ld: -Ttext 0x0000000 -Tdata 0x200 -T empty-address-2b.t #nm: -n -#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-* +#xfail: bfin-*-linux* frv-*-*linux* riscv64*-*-* tic54x-*-* [is_xcoff_format] #... 0+0 T _start #... diff --git a/ld/testsuite/ld-scripts/empty-address-3a.d b/ld/testsuite/ld-scripts/empty-address-3a.d index b3135bf9231..fe87ebc34ac 100644 --- a/ld/testsuite/ld-scripts/empty-address-3a.d +++ b/ld/testsuite/ld-scripts/empty-address-3a.d @@ -1,6 +1,7 @@ #source: empty-address-3.s #ld: -T empty-address-3a.t #nm: -n +#xfail: [is_xcoff_format] #... 0+0 T _start diff --git a/ld/testsuite/ld-scripts/empty-address-3b.d b/ld/testsuite/ld-scripts/empty-address-3b.d index 1e68e29b428..0d9babef6f7 100644 --- a/ld/testsuite/ld-scripts/empty-address-3b.d +++ b/ld/testsuite/ld-scripts/empty-address-3b.d @@ -1,6 +1,7 @@ #source: empty-address-3.s #ld: -T empty-address-3b.t #nm: -n +#xfail: [is_xcoff_format] #... 0+0 T _start