This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Rewrite copy_private_bfd_data in elf.c
- From: Nick Clifton <nickc at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com, jakub at redhat dot com
- Date: Fri, 03 Feb 2006 13:26:55 +0000
- Subject: Re: RFC: Rewrite copy_private_bfd_data in elf.c
- References: <20060202195516.GA13294@lucon.org>
Hi H. J.
I'd like to clean up copy_private_bfd_data in elf.c. It is supposed
to copy ELF program header. But it checks p_paddr in ELF progam header,
which isn't specified by ELF specification at all
Actually it is specified:
p_paddr On systems for which physical addressing is relevant,
this member is reserved for the segment's physical
address. This member requires operating system specific
information, which is described in the appendix at the
end of Book III.
and messs around progam header. I'd like to rewrite
> copy_private_bfd_data to handle copying ELF program header properly.
It will
1. Copy the entire ELF program header if none of the sections
referenced by program header is removed. It won't change the order
of segments nor merge them.
What about if sections have been added ? Or if the size of any of the
sections has changed ? Or their load/run addresses have been changed ?
Or their attributes ?
Cheers
Nick