From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 07 Feb 2012 13:19:27 +0530 Subject: [U-Boot] [RFC PATCH 2/4] OMAP3+: fix issues with Thumb build In-Reply-To: <4F3040D0.5070808@aribaud.net> References: <1328528248-20872-1-git-send-email-aneesh@ti.com> <1328528248-20872-3-git-send-email-aneesh@ti.com> <4F3040D0.5070808@aribaud.net> Message-ID: <4F30D787.9030306@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 07 February 2012 02:36 AM, Albert ARIBAUD wrote: > Le 06/02/2012 12:37, Aneesh V a ?crit : >> When U-Boot/SPL is built using the Thumb instruction set the >> toolchain has a potential issue with weakly linked symbols. >> If a function has a weakly linked default implementation in C >> and a real implementation in assembly GCC is confused about the >> instruction set of the assembly implementation. As a result >> the assembly function that is built in ARM is executed as >> if it is Thumb. This results in a crash. >> >> We need to investigate further to see if this is a toolchain >> issue or an issue with our usage of it. In the meanwhile, we >> can workaround the issue by having both the weakly linked alias >> and the real implementation in C. > > I would tend to NAK a patch submission where an issue is known and > investigation is considered but is actually bypassed by a workaround. > These tend to turn from 'temporary fix' to 'old crust' with time, > because there is no incentive for a better solution when the quick fix > "works, after all". Fair enough. I did actually report this to Linaro a long time back and they had started looking into it. But then I couldn't support it further due to some other activities that pre-empted it. I plan to revive that thread now and I shall copy you on that. But in case the issue is root-caused and the problem is indeed with the tool-chain, then I hope you will accept this patch at least in the interest of backward compatibility. Also, I hope you don't object to taking the first patch, after fixing the comments? Thanks, Aneesh