bug-binutils
[Top][All Lists]
Advanced

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

Re: GAS m68k-aout relocation bug ?


From: Patrice Mandin
Subject: Re: GAS m68k-aout relocation bug ?
Date: Thu, 29 Jan 2004 20:44:17 +0100

Le Tue, 27 Jan 2004 17:06:50 +0000
Nick Clifton <address@hidden> a écrit:

> Well this implies a patch like the one below might be what you want.

I tested it with binutils-2.14.90.0.8, and it seems to work:

example.S file:
--8<--
        .data
        .word   SOMEDEFINE
        
SOMEDEFINE      =       3
--8<--

Gas with debugging tells me:

--8<--
processing fixup:
fix a080558 binutils.S:2
    size=2 frag=a046408 where=0 offset=0 addnumber=0
   +<sym a080528 SOMEDEFINE resolved used defined absolute 3>
result:
fix a080558 binutils.S:2 done
    size=2 frag=a046408 where=0 offset=3 addnumber=0
--8<--

And objdump -D tells me:

--8<--
Disassembly of section .data:

00000000 <.data>:
   0:   0003 0000       orib #0,%d3
--8<--

So we have a correct word-sized value, with the value 3.

> I do not think that this is the correct solution to the problem
> however, since it stops all relocations being made against absolute
> symbols.

Can you provide a example.S source file that may exhibit this problem?

> A better solution I feel would be to issue a warning message when the
> reloc is generated so that the programmer can check the code to see if
> they are using a symbol before it is defined.  You should be able to
> do this in md_apply_fix3().

Well, at least, the libsf???.asm from gcc 3.3.2 assembles correctly for
m68k aout. However, I have a problem compiling libstdc++, but it needs
further investigation to know if it is related to this or not.

> Cheers
>         Nick

Thanks for your help and patch.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux




reply via email to

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