Bug #873
closedWhat happened to Elf64_Sxword?
Added by wa1ter almost 17 years ago. Updated almost 17 years ago.
0%
Description
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?
Updated by Robert_Clark almost 17 years ago
Last I heard, Aragorn still has Anduril.
On Dec 3, 2007, at 12:17 PM, walt wrote:
Updated by dillon almost 17 years ago
: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?
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by wa1ter almost 17 years ago
On Tue, 4 Dec 2007, Matthew Dillon wrote:
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?
Updated by pavalos almost 17 years ago
...
This is inherited from FreeBSD. It looks like they changed it around in their
1.13 version of elf64.h:
http://www.theshell.com/cgi-bin/cvsweb.cgi/src/sys/sys/elf64.h?cvsroot=freebsd#rev1.13
--Peter
Updated by wa1ter almost 17 years ago
Okay, I got it backwards. The other BSD's added Sxword after you forked
from FreeBSD4, as Peter says. How do you feel about updating DFly to use
the more current elf definitions? Would it be a huge job?
Updated by dillon almost 17 years ago
:Okay, I got it backwards. The other BSD's added Sxword after you forked
:from FreeBSD4, as Peter says. How do you feel about updating DFly to use
:the more current elf definitions? Would it be a huge job?
I wouldn't expect it would be difficult but for now I recommend you
just commit the changes need to get that stuff to compile.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by dillon almost 17 years ago
: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?
Elf64_Sword was never redefined, it was 64 bits when that file was
originally imported.
If you fix Elf64_Sword and add Elf64_Sxword you also have to adjust
the declaration in sys/imgact_elf.h to use Sxword instead of Sword.
That's the only thing in the kernel that I see using that definition.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by wa1ter almost 17 years ago
If you're offering me a commit bit I accept with the greatest humility and
gratitude. (And surprise ;o)
Updated by dillon almost 17 years ago
:Matthew Dillon wrote:
:> :Okay, I got it backwards. The other BSD's added Sxword after you forked
:> :from FreeBSD4, as Peter says. How do you feel about updating DFly to use
:> :the more current elf definitions? Would it be a huge job?
:>
:> I wouldn't expect it would be difficult but for now I recommend you
:> just commit the changes need to get that stuff to compile.
:
:If you're offering me a commit bit I accept with the greatest humility and
:gratitude. (And surprise ;o)
What? You don't have a commit bit!!!!
Well, clearly you should have one if I assumed you had one :-). So yes,
I am offering.
If you really do want a commit bit I'd love to give you one, lets switch
to private email. EMail me your public DSA key for ssh and I will set
up the accounts. If not, I'll just make the commit myself.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by wa1ter almost 17 years ago
Matthew Dillon wrote:
..
What? You don't have a commit bit!!!!
Well, clearly you should have one if I assumed you had one :-). So yes,
I am offering.If you really do want a commit bit I'd love to give you one, lets switch
to private email. EMail me your public DSA key for ssh and I will set
up the accounts. If not, I'll just make the commit myself.
<sigh> My IP address has been blacklisted by spamhaus.org for several
days now, so I can't send email to anyone who uses their service. My
DSA key is the same one you have for my leaf account, if that's of any
help.
I thank you for this honor, and I apologize in advance for turning the
DragonFly CVS repository into a smoking pile of rubble. Just kidding.
(I hope.)
Thanks again, and I hope to be worthy of this privilege.