From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3444553235403361704==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: Transparent imports of partial units Date: Fri, 07 Nov 2014 15:08:11 +0100 Message-ID: <1415369291.19702.28.camel@bordewijk.wildebeest.org> In-Reply-To: 545411C7.50709@redhat.com --===============3444553235403361704== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, 2014-10-31 at 15:48 -0700, Josh Stone wrote: > On 10/31/2014 11:26 AM, Petr Machata wrote: > > Mark Wielaard writes: > > = > >> So, assuming we can use the long int padding field as Dwarf_Die pointe= r, > > = > > In other words, do we want to keep backward compatibility on LLP64 > > architectures? I know Widnows do use this model, do we care? Any > > Unices with this model out there? FWIW, x32 and (MIPS) n32 are both > > ILP32 ABI's. > = > For reference: > = > /* DIE information. */ > typedef struct > { > /* The offset can be computed from the address. */ > void *addr; > struct Dwarf_CU *cu; > Dwarf_Abbrev *abbrev; > // XXX We'll see what other information will be needed. > long int padding__; > } Dwarf_Die; > = > Even if that padding is only 4 bytes on LLP64, wouldn't the whole struct > still be 32 bytes for alignment? So you may be able to cheat this one, > turn it into a pointer anyway. > = > But I'm not sure if things like struct copies will include alignment > padding. Probably not, so then this wouldn't work after all... > = > Anyway, at least this only cites Windows 64 as being LLP64: > https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models > = > And cppref agrees, though it notes some early Unix systems were ILP64. > http://en.cppreference.com/w/cpp/language/types#Data_models But ILP64 wouldn't be a problem since long and pointer have the same size. So changing the long to a pointer would really only be an ABI issue for Windows 64 API (even Windows 16 and 32 should be fine). > But really, I think it's safe to ignore Windows issues in elfutils... > = > :) Agreed. Cheers, Mark --===============3444553235403361704==--