summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-04-19 08:46:45 +0000
committerNick Clifton <nickc@redhat.com>2010-04-19 08:46:45 +0000
commitc8eb11c3a5c192caae27d7d3238932703776c127 (patch)
treeee792b6552de814ee24229ccffc20ebd37f12367 /bfd/elf64-x86-64.c
parentb5f20afcbdea985a35dbab687dbe3ea7c2adccfd (diff)
downloadgdb-c8eb11c3a5c192caae27d7d3238932703776c127.tar.gz
* archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
arhdrpos variable. * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused attribute to warned variable. Remove unused val, type and type2 variables.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 80518130319..3a24ccae578 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2676,7 +2676,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
@@ -3319,13 +3319,11 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
leaq x@tlsdesc(%rip), %rax
Change it to:
- movl $x@tpoff, %rax
- */
+ movl $x@tpoff, %rax. */
- unsigned int val, type, type2;
+ unsigned int val, type;
type = bfd_get_8 (input_bfd, contents + roff - 3);
- type2 = bfd_get_8 (input_bfd, contents + roff - 2);
val = bfd_get_8 (input_bfd, contents + roff - 1);
bfd_put_8 (output_bfd, 0x48 | ((type >> 2) & 1),
contents + roff - 3);
@@ -3554,14 +3552,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
leaq x@tlsdesc(%rip), %rax
Change it to:
- movq x@gottpoff(%rip), %rax # before xchg %ax,%ax
- */
-
- unsigned int val, type, type2;
-
- type = bfd_get_8 (input_bfd, contents + roff - 3);
- type2 = bfd_get_8 (input_bfd, contents + roff - 2);
- val = bfd_get_8 (input_bfd, contents + roff - 1);
+ movq x@gottpoff(%rip), %rax # before xchg %ax,%ax. */
/* Now modify the instruction as appropriate. To
turn a leaq into a movq in the form we use it, it
@@ -3586,12 +3577,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
call *(%rax)
Change it to:
- xchg %ax,%ax. */
-
- unsigned int val, type;
+ xchg %ax, %ax. */
- type = bfd_get_8 (input_bfd, contents + roff);
- val = bfd_get_8 (input_bfd, contents + roff + 1);
bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
continue;