public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
To: Nick Clifton <nickc@redhat.com>
Cc: "binutils@sources.redhat.com" <binutils@sources.redhat.com>
Subject: Re: [PATCH] New port @GOTOFF, @GOT, @PLT relocation token for target m32r
Date: Mon, 28 Jun 2004 08:38:00 -0000	[thread overview]
Message-ID: <40DFD90C.5050303@renesas.com> (raw)
In-Reply-To: <40DC5029.1060705@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]


> Approved and applied.
> 
> One thing though - please would you consider adding a new test to the 
> m32r section of the GAS testsuite to make sure that this new support 
> works, and continues to work with future releases.
> 
> Cheers
>   Nick

Thanks Nick!

I made a test case for @GOTOFF, @GOT, @PLT.
Please apply it too.

Regards,

Kazuhiro Inaoka

gas/testsuite/ChangeLog

2004-06-28  Kazuhiro Inaoka <inaoka dot kazuhiro at renesas dot com>

	* gas/m32r/pic.exp: Add New Test case for @GOTOFF, @GOT, @PLT.
	* gas/m32r/pic2.s: New file: Test case for @GOTOFF, @GOT, @PLT.
	* gas/m32r/pic2.d: New file: Expected results.

[-- Attachment #2: pic2.patch --]
[-- Type: text/plain, Size: 397 bytes --]

Index: pic.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/m32r/pic.exp,v
retrieving revision 1.1
diff -c -r1.1 pic.exp
*** pic.exp	19 Dec 2003 11:44:01 -0000	1.1
--- pic.exp	28 Jun 2004 08:25:39 -0000
***************
*** 2,5 ****
--- 2,6 ----
  
  if [istarget m32r*-*-*] {
      run_dump_test "pic"
+     run_dump_test "pic2"
  }

[-- Attachment #3: pic2.s --]
[-- Type: text/plain, Size: 1056 bytes --]

	.section .text
# R_M32R_GOTPC24
pic_gotpc:
	bl.s .+4
        ld24 r12,#_GLOBAL_OFFSET_TABLE_
	add r12,lr

# R_M32R_GOTPC_HI_ULO
# R_M32R_GOTPC_HI_SLO
# R_M32R_GOTPC_LO
pic_gotpc_slo:
	bl.s .+4
        seth r12,#shigh(_GLOBAL_OFFSET_TABLE_)
        add3 r12,r12,#low(_GLOBAL_OFFSET_TABLE_+4)
	add r12,lr

pic_gotpc_ulo:
	bl.s .+4
        seth r12,#high(_GLOBAL_OFFSET_TABLE_)
        or3 r12,r12,#low(_GLOBAL_OFFSET_TABLE_+4)
	add r12,lr

# R_M32R_GOT24
pic_got:
	.global sym
	ld24 r0,#sym@GOTOFF

# R_M32R_GOT16_HI_ULO
# R_M32R_GOT16_HI_SLO
# R_M32R_GOT16_LO
pic_got16:
	.global sym2
        seth r12,#shigh(sym2@GOT)
        add3 r12,r12,#low(sym2@GOT)
        seth r12,#high(sym2@GOTOFF)
        or3 r12,r12,#low(sym2@GOT)

# R_M32R_26_PLTREL
pic_plt:
	.global func
	bl func@PLT

# R_M32R_GOTOFF
gotoff:
	ld24 r0,#gotoff@GOTOFF

# R_M32R_GOTOFF_HI_ULO
# R_M32R_GOTOFF_HI_SLO
# R_M32R_GOTOFF_LO
        seth r0,#shigh(gotoff@GOTOFF)
        add3 r0,r0,#low(gotoff@GOTOFF)
        seth r0,#high(gotoff@GOTOFF)
        or3 r0,r0,#low(gotoff@GOTOFF)

	.end

[-- Attachment #4: pic2.d --]
[-- Type: text/plain, Size: 1692 bytes --]

#objdump: -dr
#name: pic2

.*: +file format .*

Disassembly of section .text:

0+0000 <pic_gotpc>:
   0:	7e 01 f0 00 	bl 4 <pic_gotpc\+0x4> \|\| nop
   4:	ec 00 00 00 	ld24 r12,0 <pic_gotpc>
			4: R_M32R_GOTPC24	_GLOBAL_OFFSET_TABLE_
   8:	0c ae f0 00 	add r12,lr \|\| nop

0+000c <pic_gotpc_slo>:
   c:	7e 01 f0 00 	bl 10 <pic_gotpc_slo\+0x4> \|\| nop
  10:	dc c0 00 00 	seth r12,[#]0x0
			10: R_M32R_GOTPC_HI_SLO	_GLOBAL_OFFSET_TABLE_
  14:	8c ac 00 00 	add3 r12,r12,[#]0
			14: R_M32R_GOTPC_LO	_GLOBAL_OFFSET_TABLE_\+0x4
  18:	0c ae f0 00 	add r12,lr \|\| nop

0+001c <pic_gotpc_ulo>:
  1c:	7e 01 f0 00 	bl 20 <pic_gotpc_ulo\+0x4> \|\| nop
  20:	dc c0 00 00 	seth r12,[#]0x0
			20: R_M32R_GOTPC_HI_ULO	_GLOBAL_OFFSET_TABLE_
  24:	8c ec 00 00 	or3 r12,r12,[#]0x0
			24: R_M32R_GOTPC_LO	_GLOBAL_OFFSET_TABLE_\+0x4
  28:	0c ae f0 00 	add r12,lr \|\| nop

0+002c <pic_got>:
  2c:	e0 00 00 00 	ld24 r0,0 <pic_gotpc>
			2c: R_M32R_GOTOFF	sym

0+0030 <pic_got16>:
  30:	dc c0 00 00 	seth r12,[#]0x0
			30: R_M32R_GOT16_HI_SLO	sym2
  34:	8c ac 00 00 	add3 r12,r12,[#]0
			34: R_M32R_GOT16_LO	sym2
  38:	dc c0 00 00 	seth r12,[#]0x0
			38: R_M32R_GOTOFF_HI_ULO	sym2
  3c:	8c ec 00 00 	or3 r12,r12,[#]0x0
			3c: R_M32R_GOT16_LO	sym2

0+0040 <pic_plt>:
  40:	fe 00 00 00 	bl 40 <pic_plt>
			40: R_M32R_26_PLTREL	func

0+0044 <gotoff>:
  44:	e0 00 00 00 	ld24 r0,0 <pic_gotpc>
			44: R_M32R_GOTOFF	.text\+0x44
  48:	d0 c0 00 00 	seth r0,[#]0x0
			48: R_M32R_GOTOFF_HI_SLO	.text\+0x44
  4c:	80 a0 00 00 	add3 r0,r0,[#]0
			4c: R_M32R_GOTOFF_LO	.text\+0x44
  50:	d0 c0 00 00 	seth r0,[#]0x0
			50: R_M32R_GOTOFF_HI_ULO	.text\+0x44
  54:	80 e0 00 00 	or3 r0,r0,[#]0x0
			54: R_M32R_GOTOFF_LO	.text\+0x44

  reply	other threads:[~2004-06-28  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 12:11 Kazuhiro Inaoka
2004-06-25  4:26 ` Kazuhiro Inaoka
2004-06-25 16:10   ` Nick Clifton
2004-06-28  8:38     ` Kazuhiro Inaoka [this message]
2004-07-09 16:25       ` Nick Clifton
2005-07-29  9:19 ` Kazuhiro Inaoka
2005-07-29 13:52   ` Nick Clifton

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=40DFD90C.5050303@renesas.com \
    --to=inaoka.kazuhiro@renesas.com \
    --cc=binutils@sources.redhat.com \
    --cc=nickc@redhat.com \
    /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).