<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to PortingNotes</title><link>https://sourceforge.net/p/elftoolchain/wiki/PortingNotes/</link><description>Recent changes to PortingNotes</description><atom:link href="https://sourceforge.net/p/elftoolchain/wiki/PortingNotes/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 28 Dec 2013 17:44:28 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/elftoolchain/wiki/PortingNotes/feed" rel="self" type="application/rss+xml"/><item><title>PortingNotes modified by Joseph Koshy</title><link>https://sourceforge.net/p/elftoolchain/wiki/PortingNotes/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -12,7 +12,7 @@
   * [FreeBSD](http://www.freebsd.org/) and [DragonFlyBSD](http://www.dragonflybsd.org/) have a related rule set called `bsd.incs.mk` which is not compatible with `bsd.inc.mk`. 
   * The rule set is missing entirely in [OpenBSD](http://www.openbsd.org/).

-We use a wrapper [source:trunk/mk/elftoolchain.inc.mk](/apps/trac/elftoolchain/browser/trunk/mk/elftoolchain.inc.mk), to work around these differences. 
+We use a wrapper [trunk/mk/elftoolchain.inc.mk](http://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/mk/elftoolchain.inc.mk), to work around these differences. 

 ## Char Signedness

@@ -24,11 +24,11 @@

 ## mktemp(1)

-  * On Ubuntu 10.04, `mktemp` has a bug ([589408](https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/589408)) that affects [source:trunk/common/native-elf-format](/apps/trac/elftoolchain/browser/trunk/common/native-elf-format). Changeset [[1124]](/apps/trac/elftoolchain/changeset/1124) has a work-around. 
+  * On Ubuntu 10.04, `mktemp` has a bug ([589408](https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/589408)) that affects [trunk/common/native-elf-format](http://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/common/native-elf-format). Changeset [r1124] has a work-around. 

 ## mmap(2)

-  * Some systems (such as [Minix3](http://www.minix3.org/), a BSD-licensed microkernel) do not implement the `mmap()` API. We fall back to a combination of `read()`/`write()` for this case. See: ticket [#366](/apps/trac/elftoolchain/ticket/366). 
+  * Some systems (such as [Minix3](http://www.minix3.org/), a BSD-licensed microkernel) do not implement the `mmap()` API. We fall back to a combination of `read()`/`write()` for this case. See: ticket [#366]. 

 ## strmode(3)

@@ -37,8 +37,8 @@

 ## Variances in ELF Types

-  * On 64-bit platforms, NetBSD 5 defines the `Elf64_Half` type as being [4 bytes wide](http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L96). This is at variance with the [ELF ABI definition for 64-bit platforms](http://www.sco.com/developers/gabi/latest/ch4.intro.html#data_representation), and breaks assumptions in our [libelf](/apps/trac/elftoolchain/browser/trunk/libelf) library about structure layout. On 64-bit platforms, NetBSD 5 defines a (non-standard) [Elf64_Quarter](http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L98) type that is 2 bytes wide. Reducing our reliance on system headers (see [#265](/apps/trac/elftoolchain/ticket/265)) could be a possible solution to deal with such issues. 
+  * On 64-bit platforms, NetBSD 5 defines the `Elf64_Half` type as being [4 bytes wide](http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L96). This is at variance with the [ELF ABI definition for 64-bit platforms](http://www.sco.com/developers/gabi/latest/ch4.intro.html#data_representation), and breaks assumptions in our [libelf](http://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/libelf) library about structure layout. On 64-bit platforms, NetBSD 5 defines a (non-standard) [Elf64_Quarter](http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L98) type that is 2 bytes wide. Reducing our reliance on system headers (see [#265]) could be a possible solution to deal with such issues. 

 ## Yacc

-  * NetBSD's default rules for handling YACC input uses the `-o` option. This causes the generated header file to have a different name than the standard "y.tab.h". See [[999]](/apps/trac/elftoolchain/changeset/999) for the current solution to this issue. 
+  * NetBSD's default rules for handling YACC input uses the `-o` option. This causes the generated header file to have a different name than the standard "y.tab.h". See [r999] for the current solution to this issue. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joseph Koshy</dc:creator><pubDate>Sat, 28 Dec 2013 17:44:28 -0000</pubDate><guid>https://sourceforge.net8078efdb394251b214d05de2a03613b1b975a8c4</guid></item><item><title>PortingNotes modified by Joseph Koshy</title><link>https://sourceforge.net/p/elftoolchain/wiki/PortingNotes/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="porting-notes"&gt;Porting Notes&lt;/h1&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#porting-notes"&gt;Porting Notes&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#bsdincmk"&gt;bsd.inc.mk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#char-signedness"&gt;Char Signedness&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#isdigit3"&gt;isdigit(3)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mktemp1"&gt;mktemp(1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mmap2"&gt;mmap(2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#strmode3"&gt;strmode(3)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#variances-in-elf-types"&gt;Variances in ELF Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#yacc"&gt;Yacc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;This wiki page documents various issues encountered while keeping our code base portable. &lt;/p&gt;
&lt;h2 id="bsdincmk"&gt;bsd.inc.mk&lt;/h2&gt;
&lt;p&gt;This &lt;strong&gt;make&lt;/strong&gt; ruleset handles include files. It is not present in all the operating systems we are interested in. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The file is named &lt;code&gt;bsd.inc.mk&lt;/code&gt; in &lt;a class="" href="http://www.netbsd.org/" rel="nofollow"&gt;NetBSD&lt;/a&gt; and in the &lt;a class="" href="https://launchpad.net/ubuntu/+source/pmake" rel="nofollow"&gt;pmake&lt;/a&gt; package in &lt;a class="" href="http://www.ubuntu.com/" rel="nofollow"&gt;Ubuntu GNU/Linux&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;&lt;a class="" href="http://www.freebsd.org/" rel="nofollow"&gt;FreeBSD&lt;/a&gt; and &lt;a class="" href="http://www.dragonflybsd.org/" rel="nofollow"&gt;DragonFlyBSD&lt;/a&gt; have a related rule set called &lt;code&gt;bsd.incs.mk&lt;/code&gt; which is not compatible with &lt;code&gt;bsd.inc.mk&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;The rule set is missing entirely in &lt;a class="" href="http://www.openbsd.org/" rel="nofollow"&gt;OpenBSD&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We use a wrapper &lt;a class="" href="/apps/trac/elftoolchain/browser/trunk/mk/elftoolchain.inc.mk"&gt;source:trunk/mk/elftoolchain.inc.mk&lt;/a&gt;, to work around these differences. &lt;/p&gt;
&lt;h2 id="char-signedness"&gt;Char Signedness&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;NetBSD/i386 uses signed characters. FreeBSD and Ubuntu GNU/Linux use unsigned characters. Code needs to be written to explicitly mention the desired signedness of &lt;code&gt;char&lt;/code&gt; sized values. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="isdigit3"&gt;isdigit(3)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;On NetBSD 5, &lt;code&gt;isdigit(3)&lt;/code&gt; is a macro that expands inline to an array access. The compiler will warn if a &lt;code&gt;char&lt;/code&gt; sized quantity is passed in as a parameter to &lt;code&gt;isdigit()&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mktemp1"&gt;mktemp(1)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;On Ubuntu 10.04, &lt;code&gt;mktemp&lt;/code&gt; has a bug (&lt;a class="" href="https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/589408" rel="nofollow"&gt;589408&lt;/a&gt;) that affects &lt;a class="" href="/apps/trac/elftoolchain/browser/trunk/common/native-elf-format"&gt;source:trunk/common/native-elf-format&lt;/a&gt;. Changeset [[1124]](/apps/trac/elftoolchain/changeset/1124) has a work-around. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mmap2"&gt;mmap(2)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Some systems (such as &lt;a class="" href="http://www.minix3.org/" rel="nofollow"&gt;Minix3&lt;/a&gt;, a BSD-licensed microkernel) do not implement the &lt;code&gt;mmap()&lt;/code&gt; API. We fall back to a combination of &lt;code&gt;read()&lt;/code&gt;/&lt;code&gt;write()&lt;/code&gt; for this case. See: ticket &lt;a class="" href="/apps/trac/elftoolchain/ticket/366"&gt;#366&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="strmode3"&gt;strmode(3)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;On NetBSD the prototype for this BSD function is present in &amp;lt;unistd.h&amp;gt;. &lt;/li&gt;
&lt;li&gt;FreeBSD places the prototype in &amp;lt;string.h&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="variances-in-elf-types"&gt;Variances in ELF Types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;On 64-bit platforms, NetBSD 5 defines the &lt;code&gt;Elf64_Half&lt;/code&gt; type as being &lt;a class="" href="http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L96" rel="nofollow"&gt;4 bytes wide&lt;/a&gt;. This is at variance with the &lt;a class="" href="http://www.sco.com/developers/gabi/latest/ch4.intro.html#data_representation" rel="nofollow"&gt;ELF ABI definition for 64-bit platforms&lt;/a&gt;, and breaks assumptions in our &lt;a class="" href="/apps/trac/elftoolchain/browser/trunk/libelf"&gt;libelf&lt;/a&gt; library about structure layout. On 64-bit platforms, NetBSD 5 defines a (non-standard) &lt;a class="" href="http://fxr.watson.org/fxr/source/sys/exec_elf.h?v=NETBSD5#L98" rel="nofollow"&gt;Elf64_Quarter&lt;/a&gt; type that is 2 bytes wide. Reducing our reliance on system headers (see &lt;a class="" href="/apps/trac/elftoolchain/ticket/265"&gt;#265&lt;/a&gt;) could be a possible solution to deal with such issues. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="yacc"&gt;Yacc&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;NetBSD's default rules for handling YACC input uses the &lt;code&gt;-o&lt;/code&gt; option. This causes the generated header file to have a different name than the standard "y.tab.h". See [[999]](/apps/trac/elftoolchain/changeset/999) for the current solution to this issue. &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joseph Koshy</dc:creator><pubDate>Wed, 25 Dec 2013 07:30:47 -0000</pubDate><guid>https://sourceforge.net673bd445648dcd9d9e0fd9e6fa3a60d4e99724e0</guid></item></channel></rss>