This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [rfa] move bfd_elf_get_arch_size() et.al. to bfd.c:bfd_get...
- To: ac131313 at cygnus dot com
- Subject: Re: [rfa] move bfd_elf_get_arch_size() et.al. to bfd.c:bfd_get...
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Tue, 18 Jul 2000 12:17:48 -0700
- CC: binutils at sourceware dot cygnus dot com
Hi Andrew,
: Tue Jul 18 13:11:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
:
: * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
: renamed functions from here.
: * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): To here.
: * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
: * bfd-in2.h: Regenerate.
This patch is OK, although you missed a couple of places where
bfd_elf_get_arch_size was used. (See patch below).
Also after applying this patch gdb/solib.c will need to be fixed, but
I will leave that to you.
I am going to go ahead and check this patch in.
Cheers
Nick
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src//src/bfd/elf.c,v
retrieving revision 1.38
diff -p -r1.38 elf.c
*** elf.c 2000/07/11 07:28:25 1.38
--- elf.c 2000/07/18 19:13:14
*************** assign_section_numbers (abfd)
*** 1937,1943 ****
/* This is a .stab section. */
elf_section_data (s)->this_hdr.sh_entsize =
! 4 + 2 * bfd_elf_get_arch_size (abfd) / 8;
}
}
break;
--- 1907,1913 ----
/* This is a .stab section. */
elf_section_data (s)->this_hdr.sh_entsize =
! 4 + 2 * bfd_get_arch_size (abfd) / 8;
}
}
break;
*************** prep_headers (abfd)
*** 3267,3273 ****
i_ehdrp->e_machine = EM_NONE;
break;
case bfd_arch_sparc:
! if (bfd_elf_get_arch_size (abfd) == 64)
i_ehdrp->e_machine = EM_SPARCV9;
else
i_ehdrp->e_machine = EM_SPARC;
--- 3237,3243 ----
i_ehdrp->e_machine = EM_NONE;
break;
case bfd_arch_sparc:
! if (bfd_get_arch_size (abfd) == 64)
i_ehdrp->e_machine = EM_SPARCV9;
else
i_ehdrp->e_machine = EM_SPARC;