Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Side by Side Diff: bfd/elf32-mips.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/elf32-microblaze.c ('k') | bfd/elf32-moxie.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* MIPS-specific support for 32-bit ELF 1 /* MIPS-specific support for 32-bit ELF
2 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 3 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4 4
5 Most of the information added by Ian Lance Taylor, Cygnus Support, 5 Most of the information added by Ian Lance Taylor, Cygnus Support,
6 <ian@cygnus.com>. 6 <ian@cygnus.com>.
7 N32/64 ABI support added by Mark Mitchell, CodeSourcery, LLC. 7 N32/64 ABI support added by Mark Mitchell, CodeSourcery, LLC.
8 <mark@codesourcery.com> 8 <mark@codesourcery.com>
9 Traditional MIPS targets support added by Koundinya.K, Dansk Data 9 Traditional MIPS targets support added by Koundinya.K, Dansk Data
10 Elektronik & Operations Research Group. <kk@ddeorg.soft.net> 10 Elektronik & Operations Research Group. <kk@ddeorg.soft.net>
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 16, /* bitsize */ 823 16, /* bitsize */
824 FALSE, /* pc_relative */ 824 FALSE, /* pc_relative */
825 0, /* bitpos */ 825 0, /* bitpos */
826 complain_overflow_dont, /* complain_on_overflow */ 826 complain_overflow_dont, /* complain_on_overflow */
827 _bfd_mips_elf_lo16_reloc, /* special_function */ 827 _bfd_mips_elf_lo16_reloc, /* special_function */
828 "R_MIPS16_LO16", /* name */ 828 "R_MIPS16_LO16", /* name */
829 TRUE, /* partial_inplace */ 829 TRUE, /* partial_inplace */
830 0x0000ffff, /* src_mask */ 830 0x0000ffff, /* src_mask */
831 0x0000ffff, /* dst_mask */ 831 0x0000ffff, /* dst_mask */
832 FALSE), /* pcrel_offset */ 832 FALSE), /* pcrel_offset */
833
834 /* MIPS16 TLS general dynamic variable reference. */
835 HOWTO (R_MIPS16_TLS_GD, /* type */
836 0, /* rightshift */
837 2, /* size (0 = byte, 1 = short, 2 = long) */
838 16, /* bitsize */
839 FALSE, /* pc_relative */
840 0, /* bitpos */
841 complain_overflow_signed, /* complain_on_overflow */
842 _bfd_mips_elf_generic_reloc, /* special_function */
843 "R_MIPS16_TLS_GD", /* name */
844 TRUE, /* partial_inplace */
845 0x0000ffff, /* src_mask */
846 0x0000ffff, /* dst_mask */
847 FALSE), /* pcrel_offset */
848
849 /* MIPS16 TLS local dynamic variable reference. */
850 HOWTO (R_MIPS16_TLS_LDM, /* type */
851 0, /* rightshift */
852 2, /* size (0 = byte, 1 = short, 2 = long) */
853 16, /* bitsize */
854 FALSE, /* pc_relative */
855 0, /* bitpos */
856 complain_overflow_signed, /* complain_on_overflow */
857 _bfd_mips_elf_generic_reloc, /* special_function */
858 "R_MIPS16_TLS_LDM", /* name */
859 TRUE, /* partial_inplace */
860 0x0000ffff, /* src_mask */
861 0x0000ffff, /* dst_mask */
862 FALSE), /* pcrel_offset */
863
864 /* MIPS16 TLS local dynamic offset. */
865 HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */
866 0, /* rightshift */
867 2, /* size (0 = byte, 1 = short, 2 = long) */
868 16, /* bitsize */
869 FALSE, /* pc_relative */
870 0, /* bitpos */
871 complain_overflow_signed, /* complain_on_overflow */
872 _bfd_mips_elf_generic_reloc, /* special_function */
873 "R_MIPS16_TLS_DTPREL_HI16", /* name */
874 TRUE, /* partial_inplace */
875 0x0000ffff, /* src_mask */
876 0x0000ffff, /* dst_mask */
877 FALSE), /* pcrel_offset */
878
879 /* MIPS16 TLS local dynamic offset. */
880 HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */
881 0, /* rightshift */
882 2, /* size (0 = byte, 1 = short, 2 = long) */
883 16, /* bitsize */
884 FALSE, /* pc_relative */
885 0, /* bitpos */
886 complain_overflow_signed, /* complain_on_overflow */
887 _bfd_mips_elf_generic_reloc, /* special_function */
888 "R_MIPS16_TLS_DTPREL_LO16", /* name */
889 TRUE, /* partial_inplace */
890 0x0000ffff, /* src_mask */
891 0x0000ffff, /* dst_mask */
892 FALSE), /* pcrel_offset */
893
894 /* MIPS16 TLS thread pointer offset. */
895 HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */
896 0, /* rightshift */
897 2, /* size (0 = byte, 1 = short, 2 = long) */
898 16, /* bitsize */
899 FALSE, /* pc_relative */
900 0, /* bitpos */
901 complain_overflow_signed, /* complain_on_overflow */
902 _bfd_mips_elf_generic_reloc, /* special_function */
903 "R_MIPS16_TLS_GOTTPREL", /* name */
904 TRUE, /* partial_inplace */
905 0x0000ffff, /* src_mask */
906 0x0000ffff, /* dst_mask */
907 FALSE), /* pcrel_offset */
908
909 /* MIPS16 TLS thread pointer offset. */
910 HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */
911 0, /* rightshift */
912 2, /* size (0 = byte, 1 = short, 2 = long) */
913 16, /* bitsize */
914 FALSE, /* pc_relative */
915 0, /* bitpos */
916 complain_overflow_signed, /* complain_on_overflow */
917 _bfd_mips_elf_generic_reloc, /* special_function */
918 "R_MIPS16_TLS_TPREL_HI16", /* name */
919 TRUE, /* partial_inplace */
920 0x0000ffff, /* src_mask */
921 0x0000ffff, /* dst_mask */
922 FALSE), /* pcrel_offset */
923
924 /* MIPS16 TLS thread pointer offset. */
925 HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */
926 0, /* rightshift */
927 2, /* size (0 = byte, 1 = short, 2 = long) */
928 16, /* bitsize */
929 FALSE, /* pc_relative */
930 0, /* bitpos */
931 complain_overflow_signed, /* complain_on_overflow */
932 _bfd_mips_elf_generic_reloc, /* special_function */
933 "R_MIPS16_TLS_TPREL_LO16", /* name */
934 TRUE, /* partial_inplace */
935 0x0000ffff, /* src_mask */
936 0x0000ffff, /* dst_mask */
937 FALSE), /* pcrel_offset */
833 }; 938 };
834 939
835 static reloc_howto_type elf_micromips_howto_table_rel[] = 940 static reloc_howto_type elf_micromips_howto_table_rel[] =
836 { 941 {
837 EMPTY_HOWTO (130), 942 EMPTY_HOWTO (130),
838 EMPTY_HOWTO (131), 943 EMPTY_HOWTO (131),
839 EMPTY_HOWTO (132), 944 EMPTY_HOWTO (132),
840 945
841 /* 26 bit jump address. */ 946 /* 26 bit jump address. */
842 HOWTO (R_MICROMIPS_26_S1, /* type */ 947 HOWTO (R_MICROMIPS_26_S1, /* type */
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 }; 1894 };
1790 1895
1791 static const struct elf_reloc_map mips16_reloc_map[] = 1896 static const struct elf_reloc_map mips16_reloc_map[] =
1792 { 1897 {
1793 { BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min }, 1898 { BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min },
1794 { BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min }, 1899 { BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min },
1795 { BFD_RELOC_MIPS16_GOT16, R_MIPS16_GOT16 - R_MIPS16_min }, 1900 { BFD_RELOC_MIPS16_GOT16, R_MIPS16_GOT16 - R_MIPS16_min },
1796 { BFD_RELOC_MIPS16_CALL16, R_MIPS16_CALL16 - R_MIPS16_min }, 1901 { BFD_RELOC_MIPS16_CALL16, R_MIPS16_CALL16 - R_MIPS16_min },
1797 { BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min }, 1902 { BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min },
1798 { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min }, 1903 { BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
1904 { BFD_RELOC_MIPS16_TLS_GD, R_MIPS16_TLS_GD - R_MIPS16_min },
1905 { BFD_RELOC_MIPS16_TLS_LDM, R_MIPS16_TLS_LDM - R_MIPS16_min },
1906 { BFD_RELOC_MIPS16_TLS_DTPREL_HI16,
1907 R_MIPS16_TLS_DTPREL_HI16 - R_MIPS16_min },
1908 { BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
1909 R_MIPS16_TLS_DTPREL_LO16 - R_MIPS16_min },
1910 { BFD_RELOC_MIPS16_TLS_GOTTPREL, R_MIPS16_TLS_GOTTPREL - R_MIPS16_min },
1911 { BFD_RELOC_MIPS16_TLS_TPREL_HI16, R_MIPS16_TLS_TPREL_HI16 - R_MIPS16_min },
1912 { BFD_RELOC_MIPS16_TLS_TPREL_LO16, R_MIPS16_TLS_TPREL_LO16 - R_MIPS16_min }
1799 }; 1913 };
1800 1914
1801 static const struct elf_reloc_map micromips_reloc_map[] = 1915 static const struct elf_reloc_map micromips_reloc_map[] =
1802 { 1916 {
1803 { BFD_RELOC_MICROMIPS_JMP, R_MICROMIPS_26_S1 - R_MICROMIPS_min }, 1917 { BFD_RELOC_MICROMIPS_JMP, R_MICROMIPS_26_S1 - R_MICROMIPS_min },
1804 { BFD_RELOC_MICROMIPS_HI16_S, R_MICROMIPS_HI16 - R_MICROMIPS_min }, 1918 { BFD_RELOC_MICROMIPS_HI16_S, R_MICROMIPS_HI16 - R_MICROMIPS_min },
1805 { BFD_RELOC_MICROMIPS_LO16, R_MICROMIPS_LO16 - R_MICROMIPS_min }, 1919 { BFD_RELOC_MICROMIPS_LO16, R_MICROMIPS_LO16 - R_MICROMIPS_min },
1806 { BFD_RELOC_MICROMIPS_GPREL16, R_MICROMIPS_GPREL16 - R_MICROMIPS_min }, 1920 { BFD_RELOC_MICROMIPS_GPREL16, R_MICROMIPS_GPREL16 - R_MICROMIPS_min },
1807 { BFD_RELOC_MICROMIPS_LITERAL, R_MICROMIPS_LITERAL - R_MICROMIPS_min }, 1921 { BFD_RELOC_MICROMIPS_LITERAL, R_MICROMIPS_LITERAL - R_MICROMIPS_min },
1808 { BFD_RELOC_MICROMIPS_GOT16, R_MICROMIPS_GOT16 - R_MICROMIPS_min }, 1922 { BFD_RELOC_MICROMIPS_GOT16, R_MICROMIPS_GOT16 - R_MICROMIPS_min },
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 #undef elf_backend_final_write_processing 2510 #undef elf_backend_final_write_processing
2397 #define elf_backend_final_write_processing \ 2511 #define elf_backend_final_write_processing \
2398 mips_vxworks_final_write_processing 2512 mips_vxworks_final_write_processing
2399 2513
2400 #undef elf_backend_additional_program_headers 2514 #undef elf_backend_additional_program_headers
2401 #undef elf_backend_modify_segment_map 2515 #undef elf_backend_modify_segment_map
2402 #undef elf_backend_symbol_processing 2516 #undef elf_backend_symbol_processing
2403 /* NOTE: elf_backend_rela_normal is not defined for MIPS. */ 2517 /* NOTE: elf_backend_rela_normal is not defined for MIPS. */
2404 2518
2405 #include "elf32-target.h" 2519 #include "elf32-target.h"
OLDNEW
« no previous file with comments | « bfd/elf32-microblaze.c ('k') | bfd/elf32-moxie.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698