aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlexander Fedotov-B55613 <b55613@freescale.com>2017-09-05 08:22:17 +0930
committerAlan Modra <amodra@gmail.com>2017-09-05 08:42:27 +0930
commit83eef883581525d04df3a8e53a82c01d0d12b56a (patch)
tree0b0f139532eacf737ad092c9ea64d26e3fde211e /gas/config
parent31cf148787509fcf33bc6adb05bbf16bee48835d (diff)
downloadgdb-83eef883581525d04df3a8e53a82c01d0d12b56a.zip
gdb-83eef883581525d04df3a8e53a82c01d0d12b56a.tar.gz
gdb-83eef883581525d04df3a8e53a82c01d0d12b56a.tar.bz2
Missing relocation R_PPC_VLE_ADDR20 and add VLE flag to details in readelf
include/ * elf/ppc.h (R_PPC_VLE_ADDR20): New relocation. bfd/ * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20. (ppc_elf_check_relocs): Handle it. (ppc_elf_vle_split20): New function. (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20. binutils/ * readelf.c (get_elf_section_flags): Add VLE. (process_section_headers): Add VLE key to details. gas/ * config/tc-ppc.c (md_parse_option): Handle "mno-vle" flag. (ppc_elf_section_letter): New function. * config/tc-ppc.h (md_elf_section_letter): New. * testsuite/gas/elf/section10.d: Adjust for VLE.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-ppc.c20
-rw-r--r--gas/config/tc-ppc.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index d20fac6..7118b71 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1206,6 +1206,16 @@ md_parse_option (int c, const char *arg)
}
}
+ else if (strcmp (arg, "no-vle") == 0)
+ {
+ sticky &= ~PPC_OPCODE_VLE;
+
+ new_cpu = ppc_parse_cpu (ppc_cpu, &sticky, "booke");
+ new_cpu &= ~PPC_OPCODE_VLE;
+
+ ppc_cpu = new_cpu;
+ }
+
else if (strcmp (arg, "regnames") == 0)
reg_names_p = TRUE;
@@ -3683,6 +3693,16 @@ ppc_section_flags (flagword flags, bfd_vma attr ATTRIBUTE_UNUSED, int type)
return flags;
}
+
+bfd_vma
+ppc_elf_section_letter (int letter, const char **ptrmsg)
+{
+ if (letter == 'v')
+ return SHF_PPC_VLE;
+
+ *ptrmsg = _("bad .section directive: want a,e,v,w,x,M,S,G,T in string");
+ return -1;
+}
#endif /* OBJ_ELF */
diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h
index 514c223..f71f2ea 100644
--- a/gas/config/tc-ppc.h
+++ b/gas/config/tc-ppc.h
@@ -226,6 +226,9 @@ extern int ppc_section_flags (flagword, bfd_vma, int);
#define tc_comment_chars ppc_comment_chars
extern const char *ppc_comment_chars;
+#define md_elf_section_letter ppc_elf_section_letter
+extern bfd_vma ppc_elf_section_letter (int, const char **);
+
/* Keep relocations relative to the GOT, or non-PC relative. */
#define tc_fix_adjustable(FIX) ppc_fix_adjustable (FIX)
extern int ppc_fix_adjustable (struct fix *);