DragonFly bugs List (threaded) for 2007-12
DragonFly BSD
DragonFly bugs List (threaded) for 2007-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: What happened to Elf64_Sxword?


From: walt <wa1ter@xxxxxxxxxxxxx>
Date: Tue, 4 Dec 2007 11:11:23 -0800

On Tue, 4 Dec 2007, Matthew Dillon wrote:

>
> :That value is defined in FreeBSD, NetBSD, OpenBSD, and linux, but not
> :in DFly.  Pkgsrc/devel/libelf won't build on DF because it's missing.
> :
> :Any particular reason to remove it?
>
>     I have no idea what Elf64_Sxword even is.  Some kind of structure or
>     elf type?  Where is it supposed to be defined?

I guess you didn't remove it, then :o)  Here is sys/elf64.h from DFly:

/*
 * ELF definitions common to all 64-bit architectures.
 */
typedef u_int64_t       Elf64_Addr;
typedef u_int32_t       Elf64_Half;
typedef u_int64_t       Elf64_Off;
typedef int64_t         Elf64_Sword;
typedef u_int64_t       Elf64_Word;
typedef u_int64_t       Elf64_Size;
typedef u_int16_t       Elf64_Quarter;
typedef Elf64_Half      Elf64_Hashelt;

And from FreeBSD 6:
typedef uint64_t        Elf64_Addr;
typedef uint16_t        Elf64_Half;
typedef uint64_t        Elf64_Off;
typedef int32_t         Elf64_Sword;
typedef int64_t         Elf64_Sxword;   <-----------
typedef uint32_t        Elf64_Word;
typedef uint64_t        Elf64_Xword;

And from linux:
typedef int32_t         Elf64_Sword;
typedef int64_t         Elf64_Sxword;


I notice that Sword was redefined from int32 to uint64 in DFly -- i.e. Sword
was redefined to the value of Sxword, which then leaves Sxword as redundant.

I'm no expert in any of this, but it seems like changing these 'industry
standard' definitions would be a bit dicey, no?



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]