bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PTLsim-devel] ptlsim stops immediately


From: Stephan Diestelhorst
Subject: Re: [PTLsim-devel] ptlsim stops immediately
Date: Fri, 23 Apr 2010 17:07:21 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31-20-generic; KDE/4.3.5; x86_64; ; )

Sergey E. Galanov wrote:
> On Thu, Apr 22, 2010 at 10:44:16AM +0200, Martin Pohlack wrote:
> > I use intrepid (8.10) not jaunty in my changeroot, I had this wrong
> > in my earlier email.
> > 
> > $ gcc-4.2 --version
> > gcc-4.2 (GCC) 4.2.4 (Ubuntu 4.2.4-3ubuntu4)
> > Copyright (C) 2007 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > 
> > This gcc works fine here.
> > 
> > Checkout the chroot route, it works nice here after some setup effort.
>
> Thank you. That helped.

I think I have a possible root cause for this: The version of the
binutils, in particular GAS. It seems that in newer versions indirect
jumps with Intel syntax are broken:

#> cat indirect_jmp.S
.text
.intel_syntax
        jmp      [func_p]
.data
func_p:
        .quad 0

Results in:
GNU assembler version 2.18.93 (x86_64-linux-gnu) using BFD version (GNU 
Binutils for Ubuntu) 2.18.93.20081009

#> objdump -d indirect_jmp.o.ubuntu_8.10
indirect_jmp.o.ubuntu_8.10:     file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
   0:   ff 24 25 00 00 00 00    jmpq   *0x0

vs.
GNU assembler version 2.20 (x86_64-linux-gnu) using BFD version (GNU Binutils 
for Ubuntu) 2.20

#> objdump -d indirect_jmp.o.ubuntu_9.10
indirect_jmp.o.ubuntu_9.10:     file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
   0:   e9 00 00 00 00          jmpq   5 <func_p+0x5>

This code is used to enter simulation through the lowlevel-*.S
functions, and clearly the newer binutils f*ck that up.

I wonder what would be the smartest thing to do:
1) Change our code to AT&T syntax.
2) Try to find an Intel syntax work around
3) Get this fixed in GAS

Comments?

Cheers,
  Stephan
-- 
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34
85609 Aschheim
Germany

Geschäftsführer: Andrew Bowd; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis München
Registergericht München, HRB Nr. 43632





reply via email to

[Prev in Thread] Current Thread [Next in Thread]