[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.
- [Bug ld/20376] New: Possible address calculation overflow, gan.bo at columbia dot edu, 2016/07/15
- [Bug ld/20376] Possible address calculation overflow, gan.bo at columbia dot edu, 2016/07/15
- [Bug ld/20376] Possible address calculation overflow, hjl.tools at gmail dot com, 2016/07/17
- [Bug ld/20376] Possible address calculation overflow, hjl.tools at gmail dot com, 2016/07/17
- [Bug ld/20376] Possible address calculation overflow,
gan.bo at columbia dot edu <=
- [Bug ld/20376] Possible address calculation overflow, hjl.tools at gmail dot com, 2016/07/18
- [Bug ld/20376] Possible address calculation overflow, hjl.tools at gmail dot com, 2016/07/18
- [Bug ld/20376] Possible address calculation overflow, cvs-commit at gcc dot gnu.org, 2016/07/20
- [Bug ld/20376] Possible address calculation overflow, cvs-commit at gcc dot gnu.org, 2016/07/21