lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Fix a build warning in scripts/sortextable.h
On 3.7.2013 14:57, Michal Marek wrote:
> On 3.7.2013 14:37, Daniel Tang wrote:
>> Hi,
>>
>> On 03/07/2013, at 10:28 PM, Michal Marek <mmarek@suse.cz> wrote:
>>>
>>>
>>> What is the type of Elf64_Shdr::sh_offset in OS X's <elf.h>? In
>>> glibc, this is Elf64_Off, which is a typedef name for uint64_t.
>>
>> Huh, that's weird. Elf64_Off is defined as unsigned long in my elf.h
>> which isn't 64 bit on x86_64 pretty sure.
>
> unsigned long _is_ 64bit on x86_64 Linux (or any 64bit Linux), but it
> might not be the case on OS X. But then, the <elf.h> on that platform
> should use something that is actually 64bit for Elf64_Off.

Hm, according to
https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html,
64bit OS X uses that same model as Linux, i.e. sizeof(long) ==
sizeof(void*). So the warning is probably caused by the fact that the
typedefs Elf64_Off and uint64_t are not identical (even though the types
have the same size). How are these defined on OS X?

Thanks,
Michal


\
 
 \ /
  Last update: 2013-07-03 16:01    [W:6.253 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site