This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: binutils-2.9.5.0.41: possible bug in objcopy --change-addresses


Sorry I cannot help. I forwarded it to the binutils mailing list.


H.J.
On Fri, May 05, 2000 at 06:26:19PM -0700, Michael Deutschmann wrote:
> I've noticed some behavior of objcopy that might be a bug.  I noticed it 
> in .37, but it seems present in .41 too.
> 
> I was working with a copy of ldso, with the following partial readelf -l 
> output:
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   LOAD           0x000000 0x00000000 0x00000000 0x12700 0x12700 R E 0x1000
>   LOAD           0x012700 0x00013700 0x00013700 0x00218 0x00690 RW  0x1000
>   DYNAMIC        0x012890 0x00013890 0x00013890 0x00088 0x00088 RW  0x4
> 
> I tried offsetting it by 0x80000000, and got the following:
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   LOAD           0x000000 0x80000000 0x80000094 0x12700 0x12700 R E 0x1000
>   LOAD           0x012700 0x80013700 0x80013700 0x00218 0x00690 RW  0x1000
>   DYNAMIC        0x012890 0x80013890 0x80013890 0x00088 0x00088 RW  0x4
> 
> Note the strange anomaly in the first physical address -- a value of 0x94 
> has been added.
> 
> I don't really know what the physical address is used for, so this might be
> legit -- however, if I shift the address in two 0x40000000 steps: 
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   LOAD           0x000000 0x40000000 0x40000094 0x12700 0x12700 R E 0x1000
>   LOAD           0x012700 0x40013700 0x40013700 0x00218 0x00690 RW  0x1000
>   DYNAMIC        0x012890 0x40013890 0x40013890 0x00088 0x00088 RW  0x4
> 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   LOAD           0x000000 0x80000000 0x80000128 0x12700 0x12700 R E 0x1000
>   LOAD           0x012700 0x80013700 0x80013700 0x00218 0x00690 RW  0x1000
>   DYNAMIC        0x012890 0x80013890 0x80013890 0x00088 0x00088 RW  0x4
> 
> The fudge is done twice.  Since the final object is different even though 
> the changes add up the same, this suggests that it is a bug, and not some 
> obscure compensation.
> 
> Such distortions seem to occur for any object, although most things that
> have program headers naturally will be useless after a VMA shift... 
> 
> ---- Michael Deutschmann <michael@talamasca.ocis.net>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]