diff mbox

ld/testsuite/ld-aarch64: Fixup IFUNC tests to work on all targets

Message ID 52A79096.8020405@linaro.org
State Accepted
Headers show

Commit Message

Will Newton Dec. 10, 2013, 10:07 p.m. UTC
Make the ifunc-21 and ifunc-22 tests more generic to support
aarch64_be and ELF targets.

ld/testsuite/ChangeLog:

2013-12-10  Will Newton  <will.newton@linaro.org>

	* ld-aarch64/ifunc-21.d: Make test more generic to support
	aarch64_be and ELF targets.
	* ld-aarch64/ifunc-22.d: Likewise.
---
 ld/testsuite/ld-aarch64/ifunc-21.d | 25 ++++++++++---------------
 ld/testsuite/ld-aarch64/ifunc-22.d |  2 +-
 2 files changed, 11 insertions(+), 16 deletions(-)

Comments

Yufeng Zhang Dec. 11, 2013, 11:40 a.m. UTC | #1
Hi Will,

Thanks for fixing it.  I can confirm that the patch fixes the failures I 
saw on aarch64*-*-elf.

I have to say that it is not ideal to just match one of two cases, as it 
is sensitive to future changes and less accurate.  However I don't have 
a better solution.

I think the patch is also needed for 2.24 branch.

Thanks,
Yufeng

On 12/10/13 22:07, Will Newton wrote:
>
> Make the ifunc-21 and ifunc-22 tests more generic to support
> aarch64_be and ELF targets.
>
> ld/testsuite/ChangeLog:
>
> 2013-12-10  Will Newton<will.newton@linaro.org>
>
> 	* ld-aarch64/ifunc-21.d: Make test more generic to support
> 	aarch64_be and ELF targets.
> 	* ld-aarch64/ifunc-22.d: Likewise.
> ---
>   ld/testsuite/ld-aarch64/ifunc-21.d | 25 ++++++++++---------------
>   ld/testsuite/ld-aarch64/ifunc-22.d |  2 +-
>   2 files changed, 11 insertions(+), 16 deletions(-)
>
> diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
> index fa139b2..9ea01e6 100644
> --- a/ld/testsuite/ld-aarch64/ifunc-21.d
> +++ b/ld/testsuite/ld-aarch64/ifunc-21.d
> @@ -8,24 +8,19 @@
>   .*:     file format elf64-(little|big)aarch64
>
>   Contents of section .text:
> - 02a0 .*
> + [0-9a-f]+ .*
>   Contents of section .got.plt:
> - 103a8 0+ 0+ 0+ 0+  .*
> - 103b8 0+ 0+ [0-9a-f]+ 0+  .*
> + [0-9a-f]+ 0+ 0+ 0+ 0+  .*
> + (103b8|10408) 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*
>
>   Disassembly of section .text:
>
> -0+2a0<ifunc>:
> - 2a0:	d65f03c0 	ret
> +.*<ifunc>:
> + .*:	d65f03c0 	ret
>
> -0+2a4<bar>:
> - 2a4:	90000080 	adrp	x0, 10000<.*>
> - 2a8:	f941e000 	ldr	x0, \[x0,#960\]
> - 2ac:	d65f03c0 	ret
> +.*<bar>:
> + .*:	90000080 	adrp	x0, 10000<.*>
> + .*:	.* 	ldr	x0, \[x0,#(960|1040)\]
> + .*:	d65f03c0 	ret
>
> -Disassembly of section .got.plt:
> -
> -.*:
> -.*
> -.*
> -.*
> +#pass
> \ No newline at end of file
> diff --git a/ld/testsuite/ld-aarch64/ifunc-22.d b/ld/testsuite/ld-aarch64/ifunc-22.d
> index f28b039..7f0978d 100644
> --- a/ld/testsuite/ld-aarch64/ifunc-22.d
> +++ b/ld/testsuite/ld-aarch64/ifunc-22.d
> @@ -8,4 +8,4 @@
>   .*:     file format elf64-(little|big)aarch64
>
>   Contents of section \.got:
> - 4100f0 00000000 00000000 d0004000 00000000  ..........@.....
> + [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .*
Marcus Shawcroft Dec. 11, 2013, 3:12 p.m. UTC | #2
On 10 December 2013 22:07, Will Newton <will.newton@linaro.org> wrote:
>
> Make the ifunc-21 and ifunc-22 tests more generic to support
> aarch64_be and ELF targets.
>
> ld/testsuite/ChangeLog:
>
> 2013-12-10  Will Newton  <will.newton@linaro.org>
>
>         * ld-aarch64/ifunc-21.d: Make test more generic to support
>         aarch64_be and ELF targets.
>         * ld-aarch64/ifunc-22.d: Likewise.

OK, thanks
/Marcus
diff mbox

Patch

diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
index fa139b2..9ea01e6 100644
--- a/ld/testsuite/ld-aarch64/ifunc-21.d
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -8,24 +8,19 @@ 
 .*:     file format elf64-(little|big)aarch64

 Contents of section .text:
- 02a0 .*
+ [0-9a-f]+ .*
 Contents of section .got.plt:
- 103a8 0+ 0+ 0+ 0+  .*
- 103b8 0+ 0+ [0-9a-f]+ 0+  .*
+ [0-9a-f]+ 0+ 0+ 0+ 0+  .*
+ (103b8|10408) 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*

 Disassembly of section .text:

-0+2a0 <ifunc>:
- 2a0:	d65f03c0 	ret
+.* <ifunc>:
+ .*:	d65f03c0 	ret

-0+2a4 <bar>:
- 2a4:	90000080 	adrp	x0, 10000 <.*>
- 2a8:	f941e000 	ldr	x0, \[x0,#960\]
- 2ac:	d65f03c0 	ret
+.* <bar>:
+ .*:	90000080 	adrp	x0, 10000 <.*>
+ .*:	.* 	ldr	x0, \[x0,#(960|1040)\]
+ .*:	d65f03c0 	ret

-Disassembly of section .got.plt:
-
-.*:
-.*
-.*
-.*
+#pass
\ No newline at end of file
diff --git a/ld/testsuite/ld-aarch64/ifunc-22.d b/ld/testsuite/ld-aarch64/ifunc-22.d
index f28b039..7f0978d 100644
--- a/ld/testsuite/ld-aarch64/ifunc-22.d
+++ b/ld/testsuite/ld-aarch64/ifunc-22.d
@@ -8,4 +8,4 @@ 
 .*:     file format elf64-(little|big)aarch64

 Contents of section \.got:
- 4100f0 00000000 00000000 d0004000 00000000  ..........@.....
+ [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .*