toolchain's output depends on toolchain used to build the compiler?
Shachar Shemesh
shachar at shemesh.biz
Tue Feb 9 12:23:32 IST 2010
Omer Zak wrote:
> On Tue, 2010-02-09 at 11:26 +0200, Shachar Shemesh wrote:
>
>> Orna Agmon Ben-Yehuda wrote:
>>
>
>
>>> If the absolute path is included (I think -g does that). The mount
>>> point in the two environments may be called differently.
>>>
>>>
>> That's why I'm using objdump -d, which does not print the source
>> files, and is path location agnostic. In essence, I'm comparing just
>> the actual assembly produced.
>>
>
> On Tue, 2010-02-09 at 11:29 +0200, Shachar Shemesh wrote:
>
>> Then again, the same source code gets compiled by two supposedly
>> identical compilers using the same compiler flags. Why should the
>> result by different?
>>
>
> 1. Compile the project twice on the same platform, saving the object
> files from each compilation - to make sure that there are no timestamps.
>
Tested (and, anyways, if that were the case then the newlib compilation
would not be the same).
> 2. From man objdump, I see that there are -d (--disassemble) and -D
> (--disassemble-all) flags. What happens if you use objdump -D instead
> of objdump -d?
>
If -d is not the same, -D is guaranteed to be different.
> This could catch blocks created from uninitialized (or
> differently-initialized) memory areas.
>
In my software or in the compiler's?
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100209/06b2c982/attachment.html>
More information about the Linux-il
mailing list