Project

General

Profile

Actions

Bug #873

closed

What happened to Elf64_Sxword?

Added by wa1ter over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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?

Actions #1

Updated by Robert_Clark over 16 years ago

Last I heard, Aragorn still has Anduril.

On Dec 3, 2007, at 12:17 PM, walt wrote:

Actions #2

Updated by dillon over 16 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
<>
Actions #3

Updated by wa1ter over 16 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?

Actions #4

Updated by pavalos over 16 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

Actions #5

Updated by wa1ter over 16 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?

Actions #6

Updated by dillon over 16 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
&lt;&gt;
Actions #7

Updated by dillon over 16 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
&lt;&gt;
Actions #8

Updated by wa1ter over 16 years ago

If you're offering me a commit bit I accept with the greatest humility and
gratitude. (And surprise ;o)

Actions #9

Updated by dillon over 16 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
&lt;&gt;
Actions #10

Updated by wa1ter over 16 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.

Actions

Also available in: Atom PDF