bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/20376] Possible address calculation overflow


From: gan.bo at columbia dot edu
Subject: [Bug ld/20376] Possible address calculation overflow
Date: Sun, 17 Jul 2016 20:09:30 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20376

--- Comment #2 from Bo Gan <gan.bo at columbia dot edu> ---
(In reply to H.J. Lu from comment #1)
> From
> 
> http://www.sco.com/developers/gabi/latest/ch5.pheader.html
> 
> p_paddr
> 
> On systems for which physical addressing is relevant, this member is
> reserved for the segment's physical address. Because System V ignores
> physical addressing for application programs, this member has unspecified
> contents for executable files and shared objects.
> 
> p_paddr can have any values.  Is this a problem for you?

Yes, it is, because objcopy will be used later to generate a plain binary file.
The binary file will be of length 4G because of the address overflow issue.

ld --gc-sections -T micro.ld prot.elf real.elf -o micro.elf
objcopy -O binary micro.elf micro.bin

Observe that micro.bin is 4G.

ld.gold --gc-sections -T micro.ld prot.elf real.elf -o micro.elf
readelf -l -S micro.elf

Observe thar micro.bin is 32K.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]