diff options
author | Alan Modra <amodra@gmail.com> | 2009-03-04 05:50:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-03-04 05:50:50 +0000 |
commit | 727fc41e077139570ea8b8ddfd6c546b2a55627c (patch) | |
tree | cb2e0c6f5409224e1658daa9ca5b8e8fea3a4503 /include | |
parent | 51dec22749b3733b1fa3df0c1290a50967887ccf (diff) | |
download | gdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.zip gdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.tar.gz gdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.tar.bz2 |
include/elf/
* ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs.
* ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs.
bfd/
* reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
* section.c (struct bfd_section): Add has_tls_get_addr_call.
(BFD_FAKE_SECTION): Init new flag.
* ecoff.c (bfd_debug_section): Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
(ppc_elf_reloc_type_lookup): Handle new relocs.
(ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
without marker relocs.
(ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
if section has no old-style calls.
(ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
Don't try to optimize new-style __tls_get_addr call when handling
arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
relocs.
* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
(ppc64_elf_reloc_type_lookup): Handle new relocs.
(ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
without marker relocs.
(ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
if section has no old-style calls. Set toc_ref for new relocs as
appropriate.
(ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
Don't try to optimize new-style __tls_get_addr call when handling
arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
relocs.
gas/
* config/tc-ppc.c (ppc_elf_suffix): Error if ppc32 tls got relocs
have non-zero addend.
(md_assemble): Parse args of __tls_get_addr calls.
(md_apply_fix): Handle BFD_RELOC_PPC_TLSGD and BFD_RELOC_PPC_TLSLD.
ld/testsuite/
* ld-powerpc/tlsmark.s, * ld-powerpc/tlsmark.d: New test.
* ld-powerpc/tlsmark32.s, * ld-powerpc/tlsmark32.d: New test.
* ld-powerpc/powerpc.exp: Run them.
Diffstat (limited to 'include')
-rw-r--r-- | include/elf/ChangeLog | 5 | ||||
-rw-r--r-- | include/elf/ppc.h | 6 | ||||
-rw-r--r-- | include/elf/ppc64.h | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 606a170..354fd61 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,8 @@ +2009-03-04 Alan Modra <amodra@bigpond.net.au> + + * ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs. + * ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs. + 2009-03-02 Qinwei <qinwei@sunnorth.com.cn> * score.h (RELOC_NUMBER): Add R_SCORE_IMM32. diff --git a/include/elf/ppc.h b/include/elf/ppc.h index a0c16f1..06df630 100644 --- a/include/elf/ppc.h +++ b/include/elf/ppc.h @@ -1,6 +1,6 @@ /* PPC ELF support for BFD. - Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008, + 2009 Free Software Foundation, Inc. By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information in the System V Application Binary Interface, PowerPC Processor Supplement @@ -100,6 +100,8 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type) RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92) RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93) RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94) + RELOC_NUMBER (R_PPC_TLSGD, 95) + RELOC_NUMBER (R_PPC_TLSLD, 96) /* The remaining relocs are from the Embedded ELF ABI, and are not in the SVR4 ELF ABI. */ diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h index 4aab2ec..c768180 100644 --- a/include/elf/ppc64.h +++ b/include/elf/ppc64.h @@ -1,5 +1,5 @@ /* PPC64 ELF support for BFD. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2005, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -136,6 +136,8 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type) RELOC_NUMBER (R_PPC64_DTPREL16_HIGHERA, 104) RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105) RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106) + RELOC_NUMBER (R_PPC64_TLSGD, 107) + RELOC_NUMBER (R_PPC64_TLSLD, 108) /* These are GNU extensions to enable C++ vtable garbage collection. */ RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253) |