https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082007-12-04T12:15:02ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=38872007-12-04T12:15:02ZRobert_Clark
<ul></ul><p>Last I heard, Aragorn still has Anduril.</p>
<p>On Dec 3, 2007, at 12:17 PM, walt wrote:</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39012007-12-05T02:08:01Zdillon
<ul></ul><p>:That value is defined in FreeBSD, NetBSD, OpenBSD, and linux, but not<br />:in DFly. Pkgsrc/devel/libelf won't build on DF because it's missing.<br />:<br />:Any particular reason to remove it?</p>
<pre><code>I have no idea what Elf64_Sxword even is. Some kind of structure or<br /> elf type? Where is it supposed to be defined?</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39072007-12-05T03:18:00Zwa1ter
<ul></ul><p>On Tue, 4 Dec 2007, Matthew Dillon wrote:</p>
<p>I guess you didn't remove it, then :o) Here is sys/elf64.h from DFly:</p>
<p>/*
* ELF definitions common to all 64-bit architectures.<br /> */<br />typedef u_int64_t Elf64_Addr;<br />typedef u_int32_t Elf64_Half;<br />typedef u_int64_t Elf64_Off;<br />typedef int64_t Elf64_Sword;<br />typedef u_int64_t Elf64_Word;<br />typedef u_int64_t Elf64_Size;<br />typedef u_int16_t Elf64_Quarter;<br />typedef Elf64_Half Elf64_Hashelt;</p>
<p>And from FreeBSD 6:<br />typedef uint64_t Elf64_Addr;<br />typedef uint16_t Elf64_Half;<br />typedef uint64_t Elf64_Off;<br />typedef int32_t Elf64_Sword;<br />typedef int64_t Elf64_Sxword; <-----------<br />typedef uint32_t Elf64_Word;<br />typedef uint64_t Elf64_Xword;</p>
<p>And from linux:<br />typedef int32_t Elf64_Sword;<br />typedef int64_t Elf64_Sxword;</p>
<p>I notice that Sword was redefined from int32 to uint64 in DFly -- i.e. Sword<br />was redefined to the value of Sxword, which then leaves Sxword as redundant.</p>
<p>I'm no expert in any of this, but it seems like changing these 'industry<br />standard' definitions would be a bit dicey, no?</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39082007-12-05T03:54:00Zpavalos
<ul></ul><p>...</p>
<p>This is inherited from FreeBSD. It looks like they changed it around in their<br />1.13 version of elf64.h:</p>
<p><a class="external" href="http://www.theshell.com/cgi-bin/cvsweb.cgi/src/sys/sys/elf64.h?cvsroot=freebsd#rev1.13">http://www.theshell.com/cgi-bin/cvsweb.cgi/src/sys/sys/elf64.h?cvsroot=freebsd#rev1.13</a></p>
<p>--Peter</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39122007-12-06T07:18:03Zwa1ter
<ul></ul><p>Okay, I got it backwards. The other BSD's added Sxword after you forked<br />from FreeBSD4, as Peter says. How do you feel about updating DFly to use<br />the more current elf definitions? Would it be a huge job?</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39302007-12-07T08:00:04Zdillon
<ul></ul><p>:Okay, I got it backwards. The other BSD's added Sxword after you forked<br />:from FreeBSD4, as Peter says. How do you feel about updating DFly to use<br />:the more current elf definitions? Would it be a huge job?</p>
<pre><code>I wouldn't expect it would be difficult but for now I recommend you<br /> just commit the changes need to get that stuff to compile.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39312007-12-07T08:02:01Zdillon
<ul></ul><p>:I notice that Sword was redefined from int32 to uint64 in DFly -- i.e. Sword<br />:was redefined to the value of Sxword, which then leaves Sxword as redundant.<br />:<br />:I'm no expert in any of this, but it seems like changing these 'industry<br />:standard' definitions would be a bit dicey, no?</p>
<pre><code>Elf64_Sword was never redefined, it was 64 bits when that file was <br /> originally imported.</code></pre>
<pre><code>If you fix Elf64_Sword and add Elf64_Sxword you also have to adjust<br /> the declaration in sys/imgact_elf.h to use Sxword instead of Sword.<br /> That's the only thing in the kernel that I see using that definition.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39342007-12-07T09:18:01Zwa1ter
<ul></ul><p>If you're offering me a commit bit I accept with the greatest humility and<br />gratitude. (And surprise ;o)</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39382007-12-07T11:23:00Zdillon
<ul></ul><p>:Matthew Dillon wrote:<br />:> :Okay, I got it backwards. The other BSD's added Sxword after you forked<br />:> :from FreeBSD4, as Peter says. How do you feel about updating DFly to use<br />:> :the more current elf definitions? Would it be a huge job?<br />:> <br />:> I wouldn't expect it would be difficult but for now I recommend you<br />:> just commit the changes need to get that stuff to compile.<br />:<br />:If you're offering me a commit bit I accept with the greatest humility and<br />:gratitude. (And surprise ;o)</p>
<pre><code>What? You don't have a commit bit!!!!</code></pre>
<pre><code>Well, clearly you should have one if I assumed you had one :-). So yes,<br /> I am offering.</code></pre>
<pre><code>If you really do want a commit bit I'd love to give you one, lets switch<br /> to private email. EMail me your public DSA key for ssh and I will set<br /> up the accounts. If not, I'll just make the commit myself.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=39432007-12-08T00:39:00Zwa1ter
<ul></ul><p>Matthew Dillon wrote:<br />..</p>
<blockquote>
<p>What? You don't have a commit bit!!!!</p>
<p>Well, clearly you should have one if I assumed you had one :-). So yes,<br />I am offering.</p>
<p>If you really do want a commit bit I'd love to give you one, lets switch<br />to private email. EMail me your public DSA key for ssh and I will set<br />up the accounts. If not, I'll just make the commit myself.</p>
</blockquote>
<p><sigh> My IP address has been blacklisted by spamhaus.org for several <br />days now, so I can't send email to anyone who uses their service. My <br />DSA key is the same one you have for my leaf account, if that's of any<br />help.</p>
<p>I thank you for this honor, and I apologize in advance for turning the<br />DragonFly CVS repository into a smoking pile of rubble. Just kidding.<br />(I hope.)</p>
<p>Thanks again, and I hope to be worthy of this privilege.</p> DragonFlyBSD - Bug #873: What happened to Elf64_Sxword?https://bugs.dragonflybsd.org/issues/873?journal_id=40662008-01-06T08:31:42Zluxh
<ul></ul><p>Fixed: <a class="external" href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-12/msg00066.html">http://leaf.dragonflybsd.org/mailarchive/commits/2007-12/msg00066.html</a><br />Some more: <a class="external" href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-12/msg00073.html">http://leaf.dragonflybsd.org/mailarchive/commits/2007-12/msg00073.html</a></p>