* Committed: Fix more set but not used warnings
@ 2010-04-19 8:46 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2010-04-19 8:46 UTC (permalink / raw)
To: binutils
Hi Guys,
I am applying the patch below to fix a couple more "set but not used"
warning messages exposed by bootstrapping GCC from the current FSF
mainline sources - this time for an x64_86 host.
Cheers
Nick
bfd/ChangeLog
2010-04-19 Nick Clifton <nickc@redhat.com>
* 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.
Index: bfd/archive64.c
===================================================================
RCS file: /cvs/src/src/bfd/archive64.c,v
retrieving revision 1.12
diff -c -3 -p -r1.12 archive64.c
*** bfd/archive64.c 9 Sep 2009 21:38:57 -0000 1.12
--- bfd/archive64.c 19 Apr 2010 08:41:56 -0000
*************** bfd_elf64_archive_slurp_armap (bfd *abfd
*** 43,49 ****
{
struct artdata *ardata = bfd_ardata (abfd);
char nextname[17];
- file_ptr arhdrpos;
bfd_size_type i, parsed_size, nsymz, stringsize, carsym_size, ptrsize;
struct areltdata *mapdata;
bfd_byte int_buf[8];
--- 43,48 ----
*************** bfd_elf64_archive_slurp_armap (bfd *abfd
*** 55,61 ****
ardata->symdefs = NULL;
/* Get the name of the first element. */
- arhdrpos = bfd_tell (abfd);
i = bfd_bread (nextname, 16, abfd);
if (i == 0)
return TRUE;
--- 54,59 ----
Index: bfd/elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.193
diff -c -3 -p -r1.193 elf64-x86-64.c
*** bfd/elf64-x86-64.c 5 Mar 2010 19:48:55 -0000 1.193
--- bfd/elf64-x86-64.c 19 Apr 2010 08:41:56 -0000
*************** elf64_x86_64_relocate_section (bfd *outp
*** 2676,2682 ****
}
else
{
! bfd_boolean warned;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
--- 2676,2682 ----
}
else
{
! bfd_boolean warned ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
*************** elf64_x86_64_relocate_section (bfd *outp
*** 3319,3331 ****
leaq x@tlsdesc(%rip), %rax
Change it to:
! movl $x@tpoff, %rax
! */
! 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);
bfd_put_8 (output_bfd, 0x48 | ((type >> 2) & 1),
contents + roff - 3);
--- 3319,3329 ----
leaq x@tlsdesc(%rip), %rax
Change it to:
! movl $x@tpoff, %rax. */
! unsigned int val, type;
type = bfd_get_8 (input_bfd, contents + roff - 3);
val = bfd_get_8 (input_bfd, contents + roff - 1);
bfd_put_8 (output_bfd, 0x48 | ((type >> 2) & 1),
contents + roff - 3);
*************** elf64_x86_64_relocate_section (bfd *outp
*** 3554,3567 ****
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);
/* Now modify the instruction as appropriate. To
turn a leaq into a movq in the form we use it, it
--- 3552,3558 ----
leaq x@tlsdesc(%rip), %rax
Change it to:
! 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
*************** elf64_x86_64_relocate_section (bfd *outp
*** 3586,3597 ****
call *(%rax)
Change it to:
! xchg %ax,%ax. */
!
! unsigned int val, type;
- 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;
--- 3577,3584 ----
call *(%rax)
Change it to:
! xchg %ax, %ax. */
bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-19 8:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 8:46 Committed: Fix more set but not used warnings Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).