This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
A question about objcopy
- From: "He Yunlong-B20256" <Harry dot He at freescale dot com>
- To: <binutils at sourceware dot org>
- Cc: "He Yunlong-B20256" <Harry dot He at freescale dot com>
- Date: Wed, 5 Aug 2009 10:09:27 +0800
- Subject: A question about objcopy
Hi, Experts,
I met one issue that "strip" rewrite vaddr of one segment, in
debugging, I find the changing occur in lines below, but why need this
change? is it for spaces to hold program headers and file headers?
static bfd_boolean
copy_elf_program_header (bfd *ibfd, bfd *obfd)
{
...
if (!map->includes_phdrs
&& !map->includes_filehdr
&& map->p_paddr_valid)
/* There is some other padding before the first section. */
map->p_vaddr_offset = ((lowest_section ? lowest_section->lma : 0)
- segment->p_paddr);
...
}
Thanks
Harry