This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH]: add ia64 vDSO support to bfd_from_remote_memory
On Fri, 2005-05-27 at 15:40, James E Wilson wrote:
> Putting this together, gives the following alternative patch which I
> have attached, which may be a better solution. I have no way to test
> this, as I don't know how to reproduce the problem, and probably don't
> even have the right OS versions necessary to reproduce.
This time really attached.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
Index: elfcode.h
===================================================================
RCS file: /cvs/src/src/bfd/elfcode.h,v
retrieving revision 1.69
diff -p -p -r1.69 elfcode.h
*** elfcode.h 26 May 2005 07:41:13 -0000 1.69
--- elfcode.h 27 May 2005 19:27:28 -0000
*************** NAME(_bfd_elf,bfd_from_remote_memory)
*** 1656,1662 ****
for (i = 0; i < i_ehdr.e_phnum; ++i)
{
elf_swap_phdr_in (templ, &x_phdrs[i], &i_phdrs[i]);
! if (i_phdrs[i].p_type == PT_LOAD)
{
bfd_vma segment_end;
segment_end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz
--- 1656,1665 ----
for (i = 0; i < i_ehdr.e_phnum; ++i)
{
elf_swap_phdr_in (templ, &x_phdrs[i], &i_phdrs[i]);
! /* IA-64 vDSO may have two mappings for one segment, where one mapping
! is executable only, and one is read only. We must not use the
! executable one. */
! if (i_phdrs[i].p_type == PT_LOAD && (i_phdrs[i].p_flags & PF_R))
{
bfd_vma segment_end;
segment_end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz
*************** NAME(_bfd_elf,bfd_from_remote_memory)
*** 1703,1709 ****
}
for (i = 0; i < i_ehdr.e_phnum; ++i)
! if (i_phdrs[i].p_type == PT_LOAD)
{
bfd_vma start = i_phdrs[i].p_offset & -i_phdrs[i].p_align;
bfd_vma end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz
--- 1706,1715 ----
}
for (i = 0; i < i_ehdr.e_phnum; ++i)
! /* IA-64 vDSO may have two mappings for one segment, where one mapping
! is executable only, and one is read only. We must not use the
! executable one. */
! if (i_phdrs[i].p_type == PT_LOAD && (i_phdrs[i].p_flags & PF_R))
{
bfd_vma start = i_phdrs[i].p_offset & -i_phdrs[i].p_align;
bfd_vma end = (i_phdrs[i].p_offset + i_phdrs[i].p_filesz