This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix handling of R_SPARC_UA32 relocation
Date: Fri, 9 Feb 2001 12:43:04 +0100
From: Jakub Jelinek <jakub@redhat.com>
On Fri, Feb 09, 2001 at 12:19:10PM +0100, Mark Kettenis wrote:
> from Mark Kettenis <kettenis@gnu.org>
>
> * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
> similar to R_SPARC_32.
Ok, but please change elf64-sparc.c the same way. R_SPARC_UA16 and
R_SPARC_UA64 seem to be correct.
Thanks, I checked in the attached patch.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
similar to R_SPARC_32.
* elf64-sparc.c (sparc64_elf_howto_table): Likewise.
Index: elf32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
retrieving revision 1.16
diff -u -r1.16 elf32-sparc.c
--- elf32-sparc.c 2000/12/08 18:34:31 1.16
+++ elf32-sparc.c 2001/02/09 16:18:43
@@ -1,5 +1,5 @@
/* SPARC-specific support for 32-bit ELF
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -85,7 +85,7 @@
HOWTO(R_SPARC_GLOB_DAT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",false,0,0x00000000,true),
HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true),
HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true),
- HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true),
+ HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true),
HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),
HOWTO(R_SPARC_HIPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HIPLT22", false,0,0x00000000,true),
HOWTO(R_SPARC_LOPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_LOPLT10", false,0,0x00000000,true),
Index: elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.21
diff -u -r1.21 elf64-sparc.c
--- elf64-sparc.c 2001/01/23 11:45:53 1.21
+++ elf64-sparc.c 2001/02/09 16:18:43
@@ -1,5 +1,5 @@
/* SPARC-specific support for 64-bit ELF
- Copyright (C) 1993, 95, 96, 97, 98, 99, 2000
+ Copyright (C) 1993, 95, 96, 97, 98, 99, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -118,7 +118,7 @@
HOWTO(R_SPARC_GLOB_DAT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",false,0,0x00000000,true),
HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true),
HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true),
- HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true),
+ HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true),
#ifndef SPARC64_OLD_RELOCS
/* These aren't implemented yet. */
HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),