This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix power4.s gas failure
On Tue, Jul 29, 2003 at 08:48:32AM +0930, Alan Modra wrote:
> On Mon, Jul 28, 2003 at 09:37:13PM +0200, Jakub Jelinek wrote:
> > Hi!
> >
> > I get following failure on ppc64-linux native gas (while it
> > works in i386->ppc64 cross).
> > The problem is 64-bit unclean code.
> > 0xe0820000L & (0x3f << 26) is 0xe0000000L, while
> > (56 << 26) is -0x20000000L.
> > Ok to commit?
Actually, there's another place needs fixing too. I've committed the
following, and committed a similar variant of your fix for gas.
* elf64-ppc.c (func_desc_adjust): Give linker created function
descriptor symbols a size and type.
(ppc64_elf_relocate_section): Correct lq insn test.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.121
diff -u -p -r1.121 elf64-ppc.c
--- bfd/elf64-ppc.c 27 Jul 2003 09:05:08 -0000 1.121
+++ bfd/elf64-ppc.c 29 Jul 2003 06:36:57 -0000
@@ -4310,6 +4310,8 @@ func_desc_adjust (struct elf_link_hash_e
}
fdh = (struct elf_link_hash_entry *) bh;
fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
+ fdh->size = 24;
+ fdh->type = STT_OBJECT;
}
if (fdh != NULL
@@ -8434,7 +8436,7 @@ ppc64_elf_relocate_section (bfd *output_
_DS relocs bloats all reloc switches in this file. It
doesn't seem to make much sense to use any of these relocs
in data, so testing the insn should be safe. */
- if ((insn & (0x3f << 26)) == (56 << 26))
+ if ((insn & (0x3f << 26)) == (56u << 26))
mask = 15;
if (((relocation + addend) & mask) != 0)
{
--
Alan Modra
IBM OzLabs - Linux Technology Centre