diff options
author | Nick Clifton <nickc@redhat.com> | 2017-07-12 12:17:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-07-12 12:17:02 +0100 |
commit | 0bae9e9ec550c940e263b37f577bf11b2dabf934 (patch) | |
tree | 82c27756b67646e785e85fa9935d3ef4a87ac1b6 /bfd | |
parent | 2fe40b6792e98dfe27e4521b2b33fe0f335ea1f0 (diff) | |
download | gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.zip gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.tar.gz gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.tar.bz2 |
Fix compile time warnings building the binutils with gcc 7.1.1.
bfd * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
plt_name buffer.
(elf_xtensa_get_gotplt_section): Increase length of got_name
buffer.
* mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
default return of FALSE.
* mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
default return of FALSE.
binutils * dwarf.c (dwarf_vmatoa_1): Do not pass a NULL string pointer to
sprintf.
* srconv.c (walk_tree_type): Initialise the spare field of the
IT_dty structure.
gas * config/tc-pru.c (md_assemble): Add continue statement after
handling 'E' operand character.
* config/tc-v850.c (md_assemble): Initialise the 'insn' variable.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/elf32-xtensa.c | 4 | ||||
-rw-r--r-- | bfd/mach-o-arm.c | 25 | ||||
-rw-r--r-- | bfd/mach-o-i386.c | 6 |
4 files changed, 33 insertions, 14 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 54aa1c7..a489357 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +2017-07-12 Nick Clifton <nickc@redhat.com> + + Fix compile time warnings using gcc 7.1.1. + * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of + plt_name buffer. + (elf_xtensa_get_gotplt_section): Increase length of got_name + buffer. + * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a + default return of FALSE. + * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a + default return of FALSE. + 2017-07-12 Alan Modra <amodra@gmail.com> * binary.c (binary_set_section_contents): Don't print filepos in diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index b3ddbf1..19a162e 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -10841,7 +10841,7 @@ static asection * elf_xtensa_get_plt_section (struct bfd_link_info *info, int chunk) { bfd *dynobj; - char plt_name[10]; + char plt_name[17]; if (chunk == 0) return elf_hash_table (info)->splt; @@ -10856,7 +10856,7 @@ static asection * elf_xtensa_get_gotplt_section (struct bfd_link_info *info, int chunk) { bfd *dynobj; - char got_name[14]; + char got_name[21]; if (chunk == 0) return elf_hash_table (info)->sgotplt; diff --git a/bfd/mach-o-arm.c b/bfd/mach-o-arm.c index e731522..5139f79 100644 --- a/bfd/mach-o-arm.c +++ b/bfd/mach-o-arm.c @@ -150,7 +150,7 @@ static bfd_boolean bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, struct mach_o_reloc_info_external *raw, arelent *res, asymbol **syms) - { +{ bfd_mach_o_reloc_info reloc; if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms)) @@ -174,6 +174,7 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, return TRUE; } return FALSE; + case BFD_MACH_O_ARM_RELOC_SECTDIFF: if (reloc.r_length == 2) { @@ -186,6 +187,7 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, return TRUE; } return FALSE; + case BFD_MACH_O_ARM_RELOC_LOCAL_SECTDIFF: if (reloc.r_length == 2) { @@ -198,6 +200,7 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, return TRUE; } return FALSE; + case BFD_MACH_O_ARM_RELOC_HALF_SECTDIFF: switch (reloc.r_length) { @@ -209,8 +212,9 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, return TRUE; } return FALSE; + default: - return FALSE; + break; } } else @@ -239,24 +243,23 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, return FALSE; } break; + case BFD_MACH_O_ARM_RELOC_BR24: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm_howto_table[11]; return TRUE; } - else - return FALSE; break; + case BFD_MACH_O_THUMB_RELOC_BR22: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm_howto_table[16]; return TRUE; } - else - return FALSE; break; + case BFD_MACH_O_ARM_RELOC_HALF: if (reloc.r_pcrel == 0) switch (reloc.r_length) @@ -268,7 +271,8 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, res->howto = &arm_howto_table[14]; return TRUE; } - return FALSE; + break; + case BFD_MACH_O_ARM_RELOC_PAIR: if (res[-1].howto == &arm_howto_table[12] && reloc.r_length == 0) @@ -290,11 +294,14 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd *abfd, res->address = res[-1].address; return TRUE; } - return FALSE; + break; + default: - return FALSE; + break; } } + + return FALSE; } static reloc_howto_type * diff --git a/bfd/mach-o-i386.c b/bfd/mach-o-i386.c index b2f0241..ce0389e 100644 --- a/bfd/mach-o-i386.c +++ b/bfd/mach-o-i386.c @@ -164,7 +164,7 @@ bfd_mach_o_i386_canonicalize_one_reloc (bfd *abfd, } return FALSE; default: - return FALSE; + break; } } else @@ -192,11 +192,11 @@ bfd_mach_o_i386_canonicalize_one_reloc (bfd *abfd, default: return FALSE; } - break; default: - return FALSE; + break; } } + return FALSE; } static bfd_boolean |