• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisiond347c9df495036dcbe5bc710ac5a07079bdd59ad (tree)
l'heure2016-04-29 22:05:12
AuteurPitchumani Sivanupandi <pitchumani.s@atme...>
CommiterNick Clifton

Message de Log

Enhance readelf's recognition of AVR relocation types.

* readelf.c (is_32bit_pcrel_reloc): Return true if reloc is 32-bit
PC relocation for AVR target.
(is_none_reloc): Return true if reloc is any of AVR diff
relocations.

Change Summary

Modification

--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
1+2016-04-29 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
2+
3+ * readelf.c (is_32bit_pcrel_reloc): Return true if reloc is 32-bit
4+ PC relocation for AVR target.
5+ (is_none_reloc): Return true if reloc is any of AVR diff
6+ relocations.
7+
18 2016-04-29 Nick Clifton <nickc@redhat.com>
29
310 PR 19938
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -11489,6 +11489,7 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
1148911489 static bfd_boolean
1149011490 is_32bit_abs_reloc (unsigned int reloc_type)
1149111491 {
11492+ /* Please keep this table alpha-sorted for ease of visual lookup. */
1149211493 switch (elf_header.e_machine)
1149311494 {
1149411495 case EM_386:
@@ -11502,6 +11503,8 @@ is_32bit_abs_reloc (unsigned int reloc_type)
1150211503 return reloc_type == 2; /* R_960_32. */
1150311504 case EM_AARCH64:
1150411505 return reloc_type == 258; /* R_AARCH64_ABS32 */
11506+ case EM_ADAPTEVA_EPIPHANY:
11507+ return reloc_type == 3;
1150511508 case EM_ALPHA:
1150611509 return reloc_type == 1; /* R_ALPHA_REFLONG. */
1150711510 case EM_ARC:
@@ -11514,8 +11517,6 @@ is_32bit_abs_reloc (unsigned int reloc_type)
1151411517 case EM_AVR_OLD:
1151511518 case EM_AVR:
1151611519 return reloc_type == 1;
11517- case EM_ADAPTEVA_EPIPHANY:
11518- return reloc_type == 3;
1151911520 case EM_BLACKFIN:
1152011521 return reloc_type == 0x12; /* R_byte4_data. */
1152111522 case EM_CRIS:
@@ -11674,6 +11675,7 @@ static bfd_boolean
1167411675 is_32bit_pcrel_reloc (unsigned int reloc_type)
1167511676 {
1167611677 switch (elf_header.e_machine)
11678+ /* Please keep this table alpha-sorted for ease of visual lookup. */
1167711679 {
1167811680 case EM_386:
1167911681 case EM_IAMCU:
@@ -11691,6 +11693,9 @@ is_32bit_pcrel_reloc (unsigned int reloc_type)
1169111693 return reloc_type == 49; /* R_ARC_32_PCREL. */
1169211694 case EM_ARM:
1169311695 return reloc_type == 3; /* R_ARM_REL32 */
11696+ case EM_AVR_OLD:
11697+ case EM_AVR:
11698+ return reloc_type == 36; /* R_AVR_32_PCREL. */
1169411699 case EM_MICROBLAZE:
1169511700 return reloc_type == 2; /* R_MICROBLAZE_32_PCREL. */
1169611701 case EM_OR1K:
@@ -11831,17 +11836,18 @@ is_24bit_abs_reloc (unsigned int reloc_type)
1183111836 static bfd_boolean
1183211837 is_16bit_abs_reloc (unsigned int reloc_type)
1183311838 {
11839+ /* Please keep this table alpha-sorted for ease of visual lookup. */
1183411840 switch (elf_header.e_machine)
1183511841 {
1183611842 case EM_ARC:
1183711843 case EM_ARC_COMPACT:
1183811844 case EM_ARC_COMPACT2:
1183911845 return reloc_type == 2; /* R_ARC_16. */
11846+ case EM_ADAPTEVA_EPIPHANY:
11847+ return reloc_type == 5;
1184011848 case EM_AVR_OLD:
1184111849 case EM_AVR:
1184211850 return reloc_type == 4; /* R_AVR_16. */
11843- case EM_ADAPTEVA_EPIPHANY:
11844- return reloc_type == 5;
1184511851 case EM_CYGNUS_D10V:
1184611852 case EM_D10V:
1184711853 return reloc_type == 3; /* R_D10V_16. */
@@ -11855,6 +11861,12 @@ is_16bit_abs_reloc (unsigned int reloc_type)
1185511861 case EM_M32C_OLD:
1185611862 case EM_M32C:
1185711863 return reloc_type == 1; /* R_M32C_16 */
11864+ case EM_CYGNUS_MN10200:
11865+ case EM_MN10200:
11866+ return reloc_type == 2; /* R_MN10200_16. */
11867+ case EM_CYGNUS_MN10300:
11868+ case EM_MN10300:
11869+ return reloc_type == 2; /* R_MN10300_16. */
1185811870 case EM_MSP430:
1185911871 if (uses_msp430x_relocs ())
1186011872 return reloc_type == 2; /* R_MSP430_ABS16. */
@@ -11870,17 +11882,11 @@ is_16bit_abs_reloc (unsigned int reloc_type)
1187011882 return reloc_type == 2; /* R_OR1K_16. */
1187111883 case EM_TI_C6000:
1187211884 return reloc_type == 2; /* R_C6000_ABS16. */
11885+ case EM_VISIUM:
11886+ return reloc_type == 2; /* R_VISIUM_16. */
1187311887 case EM_XC16X:
1187411888 case EM_C166:
1187511889 return reloc_type == 2; /* R_XC16C_ABS_16. */
11876- case EM_CYGNUS_MN10200:
11877- case EM_MN10200:
11878- return reloc_type == 2; /* R_MN10200_16. */
11879- case EM_CYGNUS_MN10300:
11880- case EM_MN10300:
11881- return reloc_type == 2; /* R_MN10300_16. */
11882- case EM_VISIUM:
11883- return reloc_type == 2; /* R_VISIUM_16. */
1188411890 case EM_XGATE:
1188511891 return reloc_type == 3; /* R_XGATE_16. */
1188611892 default:
@@ -11896,44 +11902,53 @@ is_none_reloc (unsigned int reloc_type)
1189611902 {
1189711903 switch (elf_header.e_machine)
1189811904 {
11899- case EM_68K: /* R_68K_NONE. */
1190011905 case EM_386: /* R_386_NONE. */
11901- case EM_SPARC32PLUS:
11902- case EM_SPARCV9:
11903- case EM_SPARC: /* R_SPARC_NONE. */
11904- case EM_MIPS: /* R_MIPS_NONE. */
11905- case EM_PARISC: /* R_PARISC_NONE. */
11906- case EM_ALPHA: /* R_ALPHA_NONE. */
11906+ case EM_68K: /* R_68K_NONE. */
1190711907 case EM_ADAPTEVA_EPIPHANY:
11908- case EM_PPC: /* R_PPC_NONE. */
11909- case EM_PPC64: /* R_PPC64_NONE. */
11908+ case EM_ALPHA: /* R_ALPHA_NONE. */
11909+ case EM_ALTERA_NIOS2: /* R_NIOS2_NONE. */
1191011910 case EM_ARC: /* R_ARC_NONE. */
11911- case EM_ARC_COMPACT: /* R_ARC_NONE. */
1191211911 case EM_ARC_COMPACT2: /* R_ARC_NONE. */
11912+ case EM_ARC_COMPACT: /* R_ARC_NONE. */
1191311913 case EM_ARM: /* R_ARM_NONE. */
11914- case EM_IA_64: /* R_IA64_NONE. */
11915- case EM_SH: /* R_SH_NONE. */
11916- case EM_S390_OLD:
11917- case EM_S390: /* R_390_NONE. */
11914+ case EM_C166: /* R_XC16X_NONE. */
1191811915 case EM_CRIS: /* R_CRIS_NONE. */
11919- case EM_X86_64: /* R_X86_64_NONE. */
11920- case EM_L1OM: /* R_X86_64_NONE. */
11916+ case EM_FT32: /* R_FT32_NONE. */
11917+ case EM_IA_64: /* R_IA64_NONE. */
1192111918 case EM_K1OM: /* R_X86_64_NONE. */
11919+ case EM_L1OM: /* R_X86_64_NONE. */
11920+ case EM_M32R: /* R_M32R_NONE. */
11921+ case EM_MIPS: /* R_MIPS_NONE. */
1192211922 case EM_MN10300: /* R_MN10300_NONE. */
11923- case EM_FT32: /* R_FT32_NONE. */
1192411923 case EM_MOXIE: /* R_MOXIE_NONE. */
11925- case EM_M32R: /* R_M32R_NONE. */
11926- case EM_TI_C6000:/* R_C6000_NONE. */
11924+ case EM_NIOS32: /* R_NIOS_NONE. */
11925+ case EM_OR1K: /* R_OR1K_NONE. */
11926+ case EM_PARISC: /* R_PARISC_NONE. */
11927+ case EM_PPC64: /* R_PPC64_NONE. */
11928+ case EM_PPC: /* R_PPC_NONE. */
11929+ case EM_S390: /* R_390_NONE. */
11930+ case EM_S390_OLD:
11931+ case EM_SH: /* R_SH_NONE. */
11932+ case EM_SPARC32PLUS:
11933+ case EM_SPARC: /* R_SPARC_NONE. */
11934+ case EM_SPARCV9:
1192711935 case EM_TILEGX: /* R_TILEGX_NONE. */
1192811936 case EM_TILEPRO: /* R_TILEPRO_NONE. */
11937+ case EM_TI_C6000:/* R_C6000_NONE. */
11938+ case EM_X86_64: /* R_X86_64_NONE. */
1192911939 case EM_XC16X:
11930- case EM_C166: /* R_XC16X_NONE. */
11931- case EM_ALTERA_NIOS2: /* R_NIOS2_NONE. */
11932- case EM_NIOS32: /* R_NIOS_NONE. */
11933- case EM_OR1K: /* R_OR1K_NONE. */
1193411940 return reloc_type == 0;
11941+
1193511942 case EM_AARCH64:
1193611943 return reloc_type == 0 || reloc_type == 256;
11944+ case EM_AVR_OLD:
11945+ case EM_AVR:
11946+ return (reloc_type == 0 /* R_AVR_NONE. */
11947+ || reloc_type == 30 /* R_AVR_DIFF8. */
11948+ || reloc_type == 31 /* R_AVR_DIFF16. */
11949+ || reloc_type == 32 /* R_AVR_DIFF32. */);
11950+ case EM_METAG:
11951+ return reloc_type == 3; /* R_METAG_NONE. */
1193711952 case EM_NDS32:
1193811953 return (reloc_type == 0 /* R_XTENSA_NONE. */
1193911954 || reloc_type == 204 /* R_NDS32_DIFF8. */
@@ -11946,8 +11961,6 @@ is_none_reloc (unsigned int reloc_type)
1194611961 || reloc_type == 17 /* R_XTENSA_DIFF8. */
1194711962 || reloc_type == 18 /* R_XTENSA_DIFF16. */
1194811963 || reloc_type == 19 /* R_XTENSA_DIFF32. */);
11949- case EM_METAG:
11950- return reloc_type == 3; /* R_METAG_NONE. */
1195111964 }
1195211965 return FALSE;
1195311966 }