* ld-gc/abi-note.d: Exclude aout and oldld targets.
[deliverable/binutils-gdb.git] / bfd / elf64-mips.c
index 16654a0cf7f9de9d16e53d965c7bda931eb6880d..bb079cf33e91157a34118052ec72a3475621411d 100644 (file)
@@ -1,6 +1,7 @@
 /* MIPS-specific support for 64-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
    Ian Lance Taylor, Cygnus Support
    Linker support added by Mark Mitchell, CodeSourcery, LLC.
    <mark@codesourcery.com>
@@ -1328,7 +1329,20 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
   /* TLS relocations.  */
   EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32),
   EMPTY_HOWTO (R_MIPS_TLS_DTPREL32),
-  EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
+
+  HOWTO (R_MIPS_TLS_DTPMOD64,  /* type */
+        0,                     /* rightshift */
+        4,                     /* size (0 = byte, 1 = short, 2 = long) */
+        64,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_dont, /* complain_on_overflow */
+        _bfd_mips_elf_generic_reloc, /* special_function */
+        "R_MIPS_TLS_DTPMOD64", /* name */
+        FALSE,                 /* partial_inplace */
+        MINUS_ONE,             /* src_mask */
+        MINUS_ONE,             /* dst_mask */
+        FALSE),                /* pcrel_offset */
 
   HOWTO (R_MIPS_TLS_DTPREL64,  /* type */
         0,                     /* rightshift */
@@ -1339,7 +1353,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_dont, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_DTPREL64", /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         MINUS_ONE,             /* src_mask */
         MINUS_ONE,             /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1354,7 +1368,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_GD",       /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1369,7 +1383,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_LDM",      /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1384,7 +1398,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_DTPREL_HI16",      /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1399,7 +1413,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_DTPREL_LO16",      /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1414,13 +1428,27 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_GOTTPREL", /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
 
+  /* TLS IE dynamic relocations.  */
   EMPTY_HOWTO (R_MIPS_TLS_TPREL32),
-  EMPTY_HOWTO (R_MIPS_TLS_TPREL64),
+
+  HOWTO (R_MIPS_TLS_TPREL64,   /* type */
+        0,                     /* rightshift */
+        4,                     /* size (0 = byte, 1 = short, 2 = long) */
+        64,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_dont, /* complain_on_overflow */
+        _bfd_mips_elf_generic_reloc, /* special_function */
+        "R_MIPS_TLS_TPREL64",  /* name */
+        FALSE,                 /* partial_inplace */
+        MINUS_ONE,             /* src_mask */
+        MINUS_ONE,             /* dst_mask */
+        FALSE),                /* pcrel_offset */
 
   /* TLS thread pointer offset.  */
   HOWTO (R_MIPS_TLS_TPREL_HI16,        /* type */
@@ -1432,7 +1460,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_TPREL_HI16", /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -1447,7 +1475,7 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         complain_overflow_signed, /* complain_on_overflow */
         _bfd_mips_elf_generic_reloc, /* special_function */
         "R_MIPS_TLS_TPREL_LO16", /* name */
-        TRUE,                  /* partial_inplace */
+        FALSE,                 /* partial_inplace */
         0x0000ffff,            /* src_mask */
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
@@ -3055,7 +3083,7 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
        elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
 
        /* pr_pid */
-       elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 32);
+       elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
 
        /* pr_reg */
        offset = 112;
@@ -3179,6 +3207,7 @@ const struct elf_size_info mips_elf64_size_info =
 };
 
 #define ELF_ARCH                       bfd_arch_mips
+#define ELF_TARGET_ID                  MIPS_ELF_DATA
 #define ELF_MACHINE_CODE               EM_MIPS
 
 #define elf_backend_collect            TRUE
@@ -3257,7 +3286,6 @@ const struct elf_size_info mips_elf64_size_info =
 #define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
 #define bfd_elf64_bfd_get_relocated_section_contents \
                                _bfd_elf_mips_get_relocated_section_contents
-#define bfd_elf64_mkobject             _bfd_mips_elf_mkobject
 #define bfd_elf64_bfd_link_hash_table_create \
                                _bfd_mips_elf_link_hash_table_create
 #define bfd_elf64_bfd_final_link       _bfd_mips_elf_final_link
@@ -3286,6 +3314,7 @@ extern bfd_boolean bfd_elf64_archive_write_armap
 #define bfd_elf64_archive_truncate_arname \
                        _bfd_archive_coff_truncate_arname
 #define bfd_elf64_archive_read_ar_hdr  _bfd_archive_coff_read_ar_hdr
+#define bfd_elf64_archive_write_ar_hdr _bfd_archive_coff_write_ar_hdr
 #define bfd_elf64_archive_openr_next_archived_file \
                        _bfd_archive_coff_openr_next_archived_file
 #define bfd_elf64_archive_get_elt_at_index \
This page took 0.026547 seconds and 4 git commands to generate.