* elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
This commit is contained in:
parent
2b0ee4544f
commit
86bbe32fa7
3 changed files with 17 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-01-10 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
|
||||
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
|
||||
|
||||
2002-01-08 Klee Dienes <kdienes@apple.com>
|
||||
|
||||
* Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PowerPC-specific support for 32-bit ELF
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support.
|
||||
|
||||
|
@ -3414,6 +3414,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
|
||||
relocation = sgot->output_offset + off - 4;
|
||||
}
|
||||
if (r_type == R_PPC_GOT16_HA)
|
||||
addend += ((relocation + addend) & 0x8000) << 1;
|
||||
break;
|
||||
|
||||
/* Indirect .sdata relocation */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* PowerPC64-specific support for 64-bit ELF.
|
||||
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Written by Linus Nordberg, Swox AB <info@swox.com>,
|
||||
based on elf32-ppc.c by Ian Lance Taylor.
|
||||
|
||||
|
@ -5903,6 +5903,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||
case R_PPC64_ADDR16_HA:
|
||||
case R_PPC64_ADDR16_HIGHERA:
|
||||
case R_PPC64_ADDR16_HIGHESTA:
|
||||
case R_PPC64_GOT16_HA:
|
||||
case R_PPC64_PLTGOT16_HA:
|
||||
case R_PPC64_PLT16_HA:
|
||||
case R_PPC64_TOC16_HA:
|
||||
case R_PPC64_SECTOFF_HA:
|
||||
|
|
Loading…
Reference in a new issue