From: Michal Marek <mmarek@suse.cz>
To: Daniel Tang <dt.tangr@gmail.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
trivial@kernel.org, David Daney <david.daney@cavium.com>
Subject: Re: [PATCH 1/2] Fix a build warning in scripts/sortextable.h
Date: Wed, 03 Jul 2013 15:15:57 +0200 [thread overview]
Message-ID: <51D4240D.3050708@suse.cz> (raw)
In-Reply-To: <51D41FA7.80209@suse.cz>
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
prev parent reply other threads:[~2013-07-03 13:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 2:33 [PATCH 1/2] Fix a build warning in scripts/sortextable.h Daniel Tang
2013-06-09 2:33 ` [PATCH 2/2] Fix a build warning in scripts/mod/file2alias.c Daniel Tang
2013-07-03 12:31 ` Michal Marek
2013-07-03 12:06 ` [PATCH 1/2] Fix a build warning in scripts/sortextable.h Michal Marek
2013-07-03 12:07 ` Michal Marek
2013-07-03 12:12 ` Daniel Tang
2013-07-03 12:28 ` Michal Marek
2013-07-03 12:37 ` Daniel Tang
2013-07-03 12:57 ` Michal Marek
2013-07-03 13:15 ` Michal Marek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D4240D.3050708@suse.cz \
--to=mmarek@suse.cz \
--cc=david.daney@cavium.com \
--cc=dt.tangr@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox