public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* VAX: ELF regression
@ 2005-03-30 21:08 Jan-Benedict Glaw
  2005-03-31 14:26 ` Matt Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2005-03-30 21:08 UTC (permalink / raw)
  To: binutils; +Cc: port-vax, thorpej, matt

Hi!

(This is cross-posted to two lists. Please reply to the
 binutils list *only*. Thanks.)

On Sep 27, 2002, there was a gas test added for VAX, which fails on
NetBSD these days. I've also built a binutils snapshot of Sep 30,
but that also fails. This test isn't strictly vax-netbsdelf specific,
but should also run for vax-linux (patch will follow the other day).
Could somebody review it?

gas/testsuite/gas/vax/elf-rel.s:
      1         .data
      2 
      3         .byte   data_vax_8
      4         .word   data_vax_16
      5         .long   data_vax_32
      6 
      7         .byte   data_vax_8+8
      8         .word   data_vax_16+16
      9         .long   data_vax_32+32
     10 
     11         .text
     12         .globl  x
     13 x:
     14         .word   0
     15 
     16         calls   $0, b`text_vax_pc8
     17         calls   $0, w`text_vax_pc16
     18         calls   $0, l`text_vax_pc32
     19         calls   $0, text_vax_plt32
     20 
     21         tstl    b`text_vax_pc8
     22         tstl    w`text_vax_pc16
     23         tstl    l`text_vax_pc32
     24         tstl    text_vax_got32
     25 
     26         tstl    b`text_vax_pc8+8
     27         tstl    w`text_vax_pc16+16
     28         tstl    l`text_vax_pc32+32
     29         tstl    text_vax_got32+32
     30         ret

Result (expected lines are inserted and "*" marked):
      1 #objdump: -sr
      2 #name: VAX ELF relocations
      3 
      4 # Test VAX ELF relocations
      5 
      6 .*:     file format elf32-vax
      7 
      8 RELOCATION RECORDS FOR \[\.text\]:
      9 OFFSET [ ]+ TYPE              VALUE 
     10 00000015 R_VAX_PLT32       text_vax_plt32
******* 00000015 R_VAX_PC32        text_vax_plt32
     11 00000028 R_VAX_GOT32       text_vax_got32
******* 00000028 R_VAX_PC32        text_vax_got32
     12 0000003b R_VAX_GOT32       text_vax_got32\+0x00000020
******* 0000003b R_VAX_PC32        text_vax_got32+0x00000020
     13 00000005 R_VAX_PC8         text_vax_pc8
     14 00000009 R_VAX_PC16        text_vax_pc16
     15 0000000e R_VAX_PC32        text_vax_pc32
     16 0000001b R_VAX_PC8         text_vax_pc8
     17 0000001e R_VAX_PC16        text_vax_pc16
     18 00000022 R_VAX_PC32        text_vax_pc32
     19 0000002e R_VAX_PC8         text_vax_pc8\+0x00000008
     20 00000031 R_VAX_PC16        text_vax_pc16\+0x00000010
     21 00000035 R_VAX_PC32        text_vax_pc32\+0x00000020
     22 
     23 
     24 RELOCATION RECORDS FOR \[\.data\]:
     25 OFFSET [ ]+ TYPE              VALUE 
     26 00000000 R_VAX_8           data_vax_8
     27 00000001 R_VAX_16          data_vax_16
     28 00000003 R_VAX_32          data_vax_32
     29 00000007 R_VAX_8           data_vax_8\+0x00000008
     30 00000008 R_VAX_16          data_vax_16\+0x00000010
     31 0000000a R_VAX_32          data_vax_32\+0x00000020
     32 
     33 
     34 Contents of section \.text:
     35  0000 0000fb00 affafb00 cff5fffb 00efeeff  .*
     36  0010 fffffb00 ef000000 00d5afe4 d5cfe0ff  .*
*******  0010 fffffb00 efe7ffff ffd5afe4 d5cfe0ff  ................"
     37  0020 d5efdaff ffffd5ef 00000000 d5afd9d5  .*
*******  0020 d5efdaff ffffd5ef d4ffffff d5afd9d5  ................"
     38  0030 cfddffd5 efe7ffff ffd5ef00 00000004  .*
*******  0030 cfddffd5 efe7ffff ffd5efe1 ffffff04  ................"
     39 Contents of section \.data:
     40  0000 00000000 00000000 00000000 0000      .*
     41 #pass

The testcase was added at 
http://sources.redhat.com/ml/binutils-cvs/2002-09/msg00184.html .
Building this results in no testcase tailures. Then came
http://sources.redhat.com/ml/binutils-cvs/2002-09/msg00190.html, which
modifies PLT32/PC32 handling and the testcase starts failing. But
wasn't vax-netbsdelf the only target at the time that was ELF? And
probably even the most famous [tm] VAX target at that time. I wonder
why this didn't came up earlier...

MfG, JBG

-- 
AWEK microdata GmbH -- Am Wellbach 4 -- 33609 Bielefeld

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: VAX: ELF regression
  2005-03-30 21:08 VAX: ELF regression Jan-Benedict Glaw
@ 2005-03-31 14:26 ` Matt Thomas
  2005-03-31 15:11   ` Jan-Benedict Glaw
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Thomas @ 2005-03-31 14:26 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: binutils

Jan-Benedict Glaw wrote:
> Hi!
> 
> (This is cross-posted to two lists. Please reply to the
>  binutils list *only*. Thanks.)
> 
> On Sep 27, 2002, there was a gas test added for VAX, which fails on
> NetBSD these days. I've also built a binutils snapshot of Sep 30,
> but that also fails. This test isn't strictly vax-netbsdelf specific,
> but should also run for vax-linux (patch will follow the other day).
> Could somebody review it?

It looks like -k wasn't passed to gas.  Only in that case will be
PC32 be emitted as PLT32 or GOT32.
-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: VAX: ELF regression
  2005-03-31 14:26 ` Matt Thomas
@ 2005-03-31 15:11   ` Jan-Benedict Glaw
  2005-04-01 14:09     ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2005-03-31 15:11 UTC (permalink / raw)
  To: Matt Thomas; +Cc: binutils

On Wed, Mar 30, 2005 at 03:24:33PM -0800, Matt Thomas wrote:
> Jan-Benedict Glaw wrote:
> > On Sep 27, 2002, there was a gas test added for VAX, which fails on
> > NetBSD these days. I've also built a binutils snapshot of Sep 30,
> > but that also fails. This test isn't strictly vax-netbsdelf specific,
> > but should also run for vax-linux (patch will follow the other day).
> > Could somebody review it?
> 
> It looks like -k wasn't passed to gas.  Only in that case will be
> PC32 be emitted as PLT32 or GOT32.

Thanks for clarifying this. Here's the patch.

2005-03-31  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
	* gas/testsuite/gas/vax/elf-rel.d: Call gas with -k. Thanks to
	Matt Thomas for figuring out.
	* gas/testsuite/gas/vax/vax.exp: Run elf-rel.[sd] for NetBSD-ELF
	and Linux.

diff -Nurp src-fresh/gas/testsuite/gas/vax/elf-rel.d src-hacked/gas/testsuite/gas/vax/elf-rel.d
--- src-fresh/gas/testsuite/gas/vax/elf-rel.d	2002-09-28 01:36:01.000000000 +0200
+++ src-hacked/gas/testsuite/gas/vax/elf-rel.d	2005-03-31 09:35:17.000000000 +0200
@@ -1,3 +1,4 @@
+#as: -k
 #objdump: -sr
 #name: VAX ELF relocations
 
diff -Nurp src-fresh/gas/testsuite/gas/vax/vax.exp src-hacked/gas/testsuite/gas/vax/vax.exp
--- src-fresh/gas/testsuite/gas/vax/vax.exp	2003-12-03 16:07:17.000000000 +0100
+++ src-hacked/gas/testsuite/gas/vax/vax.exp	2005-03-31 09:36:29.000000000 +0200
@@ -29,7 +29,7 @@ proc do_quad {} {
 if [istarget vax-*-* ] then {
     do_quad
 
-    if [istarget vax-*-*elf*] {
+    if { [istarget vax-*-*elf*] || [istarget vax-*-linux-gnu*] } then {
 	run_dump_test "elf-rel"
     }
 }

MfG, JBG

-- 
AWEK microdata GmbH -- Am Wellbach 4 -- 33609 Bielefeld

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: VAX: ELF regression
  2005-03-31 15:11   ` Jan-Benedict Glaw
@ 2005-04-01 14:09     ` Nick Clifton
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2005-04-01 14:09 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: Matt Thomas, binutils

Hi Jan-Benedict,

> 2005-03-31  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
> 	* gas/testsuite/gas/vax/elf-rel.d: Call gas with -k. Thanks to
> 	Matt Thomas for figuring out.
> 	* gas/testsuite/gas/vax/vax.exp: Run elf-rel.[sd] for NetBSD-ELF
> 	and Linux.

Approved and applied.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-01 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-30 21:08 VAX: ELF regression Jan-Benedict Glaw
2005-03-31 14:26 ` Matt Thomas
2005-03-31 15:11   ` Jan-Benedict Glaw
2005-04-01 14:09     ` Nick Clifton

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).