All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] arm: lds: Remove libgcc eabi exception handling tables
Date: Mon, 03 Jun 2013 08:40:12 +0200	[thread overview]
Message-ID: <51AC3A4C.20604@monstr.eu> (raw)
In-Reply-To: <20130514174427.5e0a0614@lilith>

Hi Albert,

On 05/14/2013 05:44 PM, Albert ARIBAUD wrote:
> Hi Michal,
> 
> On Mon, 13 May 2013 09:45:12 +0200, Michal Simek <monstr@monstr.eu>
> wrote:
> 
>> On 05/10/2013 09:07 PM, Albert ARIBAUD wrote:
>>> Hi Michal,
>>>
>>> On Thu,  9 May 2013 11:35:33 +0200, Michal Simek
>>> <michal.simek@xilinx.com> wrote:
>>>
>>>> Remove ARM eabi exception handling tables (for frame unwinding).
>>>> AFAICT, u-boot stubs away the frame unwiding routines, so the tables will
>>>> more or less just consume space. It should be OK to remove them.
>>>>
>>>> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>> Other options could be to complete u-boot/arch/arm/lib/* so that
>>>> libgcc routines with exception handling dont get pulled in. Or
>>>> to avoid user code (like the mentioned patch) which causes external
>>>> libgcc functions to get pulled in...
>>>
>>> Er... which mentioned patch?
>>
>> Ah yeah. Let me give you background.
>> After adding:
>> "arm: zynq: U-Boot udelay < 1000 FIX"
>> (sha1: d54cc007878697a92e7f696b71a3eb203c0386e2)
>>
>> we have found that new program header is added to u-boot for zynq.
>>
>> Program Header:
>> 0x70000001 off    0x000405fc vaddr 0x040385fc paddr 0x040385fc align 2**2
>>          filesz 0x00000020 memsz 0x00000020 flags r--
>>     LOAD off    0x00008000 vaddr 0x04000000 paddr 0x04000000 align 2**15
>>          filesz 0x00041240 memsz 0x00041240 flags rwx
>>    STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
>>          filesz 0x00000000 memsz 0x00000000 flags rwx
>>
>> Tracing down this we found that uldivmod is used
>>     27: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __aeabi_uldivmod
>>
>> Based on that Edgar proposed this patch.
> 
> Ok, so Michal and I just did some fiddling with zynq builds and
> *exidx* sections.
> 
> By default the *exidx* sections are between rodata and data, so
> removing them causes many apparent changes at the binary level.
> However, builds of zynq based on ARM master with the patch above vs
> master with a patch mapping *exidx* sections after BSS gives identical
> binaries. Thus the RFC has no functional effect. 
> 
> Also, ARM EHABI states that [exception] Tables are not required for ABI
> compliance at the C/Assembler level but are required for C++.
> 
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
> 
> So as long as we don't put any C++ code in U-Boot (a prospect that I
> don't see happening any time soon), this RFC is safe and either is a
> no-op or removes useless bytes from the binary.

Any update on this?
Have you decided to add or not to add to this release?
If you I need to fix zynq timer code do not use exception handling table.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130603/d512a8e6/attachment.pgp>

      reply	other threads:[~2013-06-03  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09  9:35 [U-Boot] [RFC PATCH] arm: lds: Remove libgcc eabi exception handling tables Michal Simek
2013-05-10 19:07 ` Albert ARIBAUD
2013-05-13  7:45   ` Michal Simek
2013-05-14 15:44     ` Albert ARIBAUD
2013-06-03  6:40       ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51AC3A4C.20604@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.