<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mcBachmann.de TechBlog &#187; thumb</title>
	<atom:link href="http://blog.mcbachmann.de/tag/thumb/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mcbachmann.de</link>
	<description>Der Blog zur Website ;-)</description>
	<lastBuildDate>Mon, 06 Sep 2010 13:11:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>arm: remove thumb instruction &#8220;bx lr&#8221; from EABI binary</title>
		<link>http://blog.mcbachmann.de/linux/arm-remove-thumb-instruction-bx-lr-from-eabi-binary</link>
		<comments>http://blog.mcbachmann.de/linux/arm-remove-thumb-instruction-bx-lr-from-eabi-binary#comments</comments>
		<pubDate>Mon, 14 Sep 2009 04:59:01 +0000</pubDate>
		<dc:creator>Sven Bachmann</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[eabi]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[thumb]]></category>

		<guid isPermaLink="false">http://blog.mcbachmann.de/?p=387</guid>
		<description><![CDATA[Today I had a strange error using the GCC version 4.4.1 with EABI support on a non thumb-ARMv4. Everytime I compiled something, with and w/o the -mno-thumb-interwork parameter it also contained the bx lr instruction which is only for later ARM processors with thumb support.
The only solution seemed to be to patch the GCC. Urgs&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had a strange error using the GCC version 4.4.1 with EABI support on a non thumb-ARMv4. Everytime I compiled something, with and w/o the <em>-mno-thumb-interwork</em> parameter it also contained the <strong>bx lr</strong> instruction which is only for later ARM processors with thumb support.<span id="more-387"></span></p>
<p>The only solution seemed to be to patch the GCC. Urgs&#8230; not really a nice solution, because recompiling GCC takes 3 stages and much time. After lots of googling I finally found the solution in the <a href="http://wiki.debian.org/ArmEabiPort#Otherscenarios">Debian Wiki</a>.</p>
<p>GCC will always compile the new <strong>bx lr</strong> instruction and its the assemblers and linkers part to replace it with a normal call on normal ARMs. The problem is&#8230; GCC doesn&#8217;t tell the assembler/linker that it needs to do it. So we have to do it:</p>
<blockquote><p><code>CFLAGS += -Xlinker --fix-v4bx -Xassembler --fix-v4bx</code></p></blockquote>
<p><br/></p>
<hr/>
<br/><br />
<em>Later on&#8230;</em> It seemed that a lot of apps in OpenWrt didn&#8217;t respect my compiler flags, so I needed to patch GCC. You can find the result here: <strong><a href="https://lists.openwrt.org/pipermail/openwrt-devel/2009-September/005018.html">gcc 4.4.1: ARM &#8211; save fix-v4bx flag in linker spec</a></strong> (patch is agains OpenWrt). The plain patch against GCC 4.4.1 is here: <strong><a href='http://blog.mcbachmann.de/wp-content/uploads/2009/09/gcc-save-fix-v4bx-for-linker.patch'>gcc-save-fix-v4bx-for-linker.patch</a></strong>. If it turns out that this is the correct kind to do it, I&#8217;ll send it to the GCC list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mcbachmann.de/linux/arm-remove-thumb-instruction-bx-lr-from-eabi-binary/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
