From: "H.J. Lu" <hjl.tools@gmail.com>
To: Binutils <binutils@sourceware.org>
Subject: Re: Calling equ'd symbols in GAS
Date: Fri, 05 Aug 2011 14:13:00 -0000 [thread overview]
Message-ID: <CAMe9rOrWORfdauEq8KsMCdZXZoCjdqQ-8kLHiGzCe+xREfBzfw@mail.gmail.com> (raw)
In-Reply-To: <20110805041417.GR26813@bubble.grove.modra.org>
On Thu, Aug 4, 2011 at 9:14 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Aug 01, 2011 at 12:29:17PM -0700, H.J. Lu wrote:
>> * gas/i386/x86-64-branch.s: Add tests for direct branch.
>> * gas/i386/x86-64-branch.d: Updated.
>> * gas/i386/ilp32/x86-64-branch.d: Likewise.
>
> Needs tweaking. eg. on x86_64-mingw32, I see
>
> regexp_diff match failure
> regexp "^[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x1f 1b: R_X86_64_PC32 \*ABS\*\+0x10003c$"
> line " 1a: e8 5b 00 10 00 callq 10007a <.text+0x10007a> 1b: R_X86_64_PC32 *ABS*"
> regexp_diff match failure
> regexp "^[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x24 20: R_X86_64_PC32 \*ABS\*\+0x10003c$"
> line " 1f: e9 60 00 10 00 jmpq 100084 <.text+0x100084> 20: R_X86_64_PC32 *ABS*"
> regexp_diff match failure
> regexp "^[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x43 3f: R_X86_64_PC32 \*ABS\*\+0x10003c$"
> line " 3e: e8 7f 00 10 00 callq 1000c2 <.text+0x1000c2> 3f: R_X86_64_PC32 *ABS*"
> regexp_diff match failure
> regexp "^[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x48 44: R_X86_64_PC32 \*ABS\*\+0x10003c$"
> line " 43: e9 84 00 10 00 jmpq 1000cc <.text+0x1000cc> 44: R_X86_64_PC32 *ABS*"
> FAIL: x86-64 indirect branch
>
I checked in this.
Thanks.
--
H.J.
-
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c6c0579..5154d36 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/x86-64-branch.d: Pass -dw to objdump and support
+ win64.
+
2011-08-04 H.J. Lu <hongjiu.lu@intel.com>
* gas/elf/bad-group.d: New.
diff --git a/gas/testsuite/gas/i386/x86-64-branch.d b/gas/testsuite/gas/i386/x86
-64-branch.d
index 428ce5b..fee2099 100644
--- a/gas/testsuite/gas/i386/x86-64-branch.d
+++ b/gas/testsuite/gas/i386/x86-64-branch.d
@@ -1,5 +1,5 @@
#as: -J
-#objdump: -drw
+#objdump: -dw
#name: x86-64 indirect branch
.*: +file format .*
@@ -17,8 +17,8 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
-[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x1f 1b: R_X86_64_PC3
2 \*ABS\*\+0x10003c
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x24 20: R_X86_64_PC3
2 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: e8 (00|5b) 00 (00|10) 00 callq (0x1f|10007a <.te
xt\+0x10007a>)
+[ ]*[a-f0-9]+: e9 (00|60) 00 (00|10) 00 jmpq (0x24|100084 <.te
xt\+0x100084>)
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: ff d0 callq \*%rax
[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
@@ -29,6 +29,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
-[ ]*[a-f0-9]+: e8 00 00 00 00 callq 0x43 3f: R_X86_64_PC3
2 \*ABS\*\+0x10003c
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 0x48 44: R_X86_64_PC3
2 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: e8 (00|7f) 00 (00|10) 00 callq (0x43|1000c2 <.te
xt\+0x1000c2>)
+[ ]*[a-f0-9]+: e9 (00|84) 00 (00|10) 00 jmpq (0x48|1000cc <.te
xt\+0x1000cc>)
#pass
prev parent reply other threads:[~2011-08-05 14:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 3:21 Eduardo Cavazos
2011-07-29 3:49 ` Alan Modra
2011-07-29 6:11 ` Eduardo Cavazos
2011-07-29 6:32 ` Alan Modra
2011-07-29 6:50 ` Eduardo Cavazos
2011-07-29 7:35 ` Alan Modra
2011-07-29 7:46 ` Eduardo Cavazos
2011-07-29 9:26 ` Alan Modra
2011-07-29 11:03 ` Eduardo Cavazos
2011-07-29 14:57 ` H.J. Lu
[not found] ` <1312156228.3441.284.camel@dharmatech-ThinkPad-T61>
2011-08-01 19:29 ` H.J. Lu
2011-08-01 21:42 ` Eduardo Cavazos
2011-08-05 4:14 ` Alan Modra
2011-08-05 14:13 ` H.J. Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOrWORfdauEq8KsMCdZXZoCjdqQ-8kLHiGzCe+xREfBzfw@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).