* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
@ 2013-07-25 14:16 Michal Simek
2013-09-05 13:03 ` Albert ARIBAUD
2013-09-05 19:16 ` Albert ARIBAUD
0 siblings, 2 replies; 7+ messages in thread
From: Michal Simek @ 2013-07-25 14:16 UTC (permalink / raw)
To: u-boot
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>
---
This patch was sent to ML as RFC (May 9)
Here is the origin response in connection to 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.
---
arch/arm/cpu/u-boot.lds | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 3037885..8894c8a 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -113,4 +113,6 @@ SECTIONS
/DISCARD/ : { *(.plt*) }
/DISCARD/ : { *(.interp*) }
/DISCARD/ : { *(.gnu*) }
+ /DISCARD/ : { *(.ARM.exidx*) }
+ /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
}
--
1.8.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130725/9baf542d/attachment.pgp>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-07-25 14:16 [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables Michal Simek
@ 2013-09-05 13:03 ` Albert ARIBAUD
2013-09-05 15:30 ` Michal Simek
2013-09-05 19:16 ` Albert ARIBAUD
1 sibling, 1 reply; 7+ messages in thread
From: Albert ARIBAUD @ 2013-09-05 13:03 UTC (permalink / raw)
To: u-boot
Hi Michal,
On Thu, 25 Jul 2013 16:16:46 +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>
> ---
> This patch was sent to ML as RFC (May 9)
>
> Here is the origin response in connection to 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.
>
> ---
> arch/arm/cpu/u-boot.lds | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> index 3037885..8894c8a 100644
> --- a/arch/arm/cpu/u-boot.lds
> +++ b/arch/arm/cpu/u-boot.lds
> @@ -113,4 +113,6 @@ SECTIONS
> /DISCARD/ : { *(.plt*) }
> /DISCARD/ : { *(.interp*) }
> /DISCARD/ : { *(.gnu*) }
> + /DISCARD/ : { *(.ARM.exidx*) }
> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
> }
> --
> 1.8.2.3
>
The good news is, it applies and does not cause any build issues.
The less good news is, arch/arm/cpu/u-boot.lds is not the only linker
script file to fix if we want to fix it this way.
The fact is, I am not sure removing sections from the ELF filein order
to avoid them being in the binary is actually the right way to go. I
have recently had to 'un-discard' some sections in order for
'offline' debugging tools to properly understand the ELF file.
So I am wondering if we should not stop using /DISCARD/ and start using
$(CROSS_COMPILE)objcopy options (-j or --strip-* and --remove-section).
This way, the ELF file would be as complete as any debug tool might
expect it (e.g. objdump, especially when debugging relocation issues)
yet the binary file would remain unchanged.
But past rc2 is not a time to start such a change.
Still, I'd like your fix to be consistent across all of ARM. Can you
change all the linker scripts used for build ARM targets? These are,
according to an ugly mix of cat LOG/*.MAKELOG, sed, grep and sort -u:
arch/arm/cpu/arm1136/u-boot-spl.lds
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
arch/arm/cpu/ixp/u-boot.lds
arch/arm/cpu/u-boot.lds
arch/arm/cpu/u-boot-spl.lds
board/actux1/u-boot.lds
board/actux2/u-boot.lds
board/actux3/u-boot.lds
board/ait/cam_enc_4xx/u-boot-spl.lds
board/davinci/da8xxevm/u-boot-spl-da850evm.lds
board/davinci/da8xxevm/u-boot-spl-hawk.lds
board/dvlhost/u-boot.lds
board/freescale/mx31ads/u-boot.lds
board/samsung/common/exynos-uboot-spl.lds
board/ti/am335x/u-boot.lds
board/vpac270/u-boot-spl.lds
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-09-05 13:03 ` Albert ARIBAUD
@ 2013-09-05 15:30 ` Michal Simek
2013-09-05 16:05 ` Albert ARIBAUD
0 siblings, 1 reply; 7+ messages in thread
From: Michal Simek @ 2013-09-05 15:30 UTC (permalink / raw)
To: u-boot
Hi Albert,
On 09/05/2013 03:03 PM, Albert ARIBAUD wrote:
> Hi Michal,
>
> On Thu, 25 Jul 2013 16:16:46 +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>
>> ---
>> This patch was sent to ML as RFC (May 9)
>>
>> Here is the origin response in connection to 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.
>>
>> ---
>> arch/arm/cpu/u-boot.lds | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
>> index 3037885..8894c8a 100644
>> --- a/arch/arm/cpu/u-boot.lds
>> +++ b/arch/arm/cpu/u-boot.lds
>> @@ -113,4 +113,6 @@ SECTIONS
>> /DISCARD/ : { *(.plt*) }
>> /DISCARD/ : { *(.interp*) }
>> /DISCARD/ : { *(.gnu*) }
>> + /DISCARD/ : { *(.ARM.exidx*) }
>> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
>> }
>> --
>> 1.8.2.3
>>
>
> The good news is, it applies and does not cause any build issues.
>
> The less good news is, arch/arm/cpu/u-boot.lds is not the only linker
> script file to fix if we want to fix it this way.
>
> The fact is, I am not sure removing sections from the ELF filein order
> to avoid them being in the binary is actually the right way to go. I
> have recently had to 'un-discard' some sections in order for
> 'offline' debugging tools to properly understand the ELF file.
>
> So I am wondering if we should not stop using /DISCARD/ and start using
> $(CROSS_COMPILE)objcopy options (-j or --strip-* and --remove-section).
>
> This way, the ELF file would be as complete as any debug tool might
> expect it (e.g. objdump, especially when debugging relocation issues)
> yet the binary file would remain unchanged.
>
> But past rc2 is not a time to start such a change.
>
> Still, I'd like your fix to be consistent across all of ARM. Can you
> change all the linker scripts used for build ARM targets? These are,
> according to an ugly mix of cat LOG/*.MAKELOG, sed, grep and sort -u:
>
> arch/arm/cpu/arm1136/u-boot-spl.lds
> arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
> arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
> arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
> arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
> arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
> arch/arm/cpu/ixp/u-boot.lds
> arch/arm/cpu/u-boot.lds
> arch/arm/cpu/u-boot-spl.lds
> board/actux1/u-boot.lds
> board/actux2/u-boot.lds
> board/actux3/u-boot.lds
> board/ait/cam_enc_4xx/u-boot-spl.lds
> board/davinci/da8xxevm/u-boot-spl-da850evm.lds
> board/davinci/da8xxevm/u-boot-spl-hawk.lds
> board/dvlhost/u-boot.lds
> board/freescale/mx31ads/u-boot.lds
> board/samsung/common/exynos-uboot-spl.lds
> board/ti/am335x/u-boot.lds
> board/vpac270/u-boot-spl.lds
Honestly for me is much easier just fix our timer code not to use this section
instead of trying to fix 3rd party platforms.
Is there any reason why too many linkers scripts are in u-boot for ARM?
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/20130905/e6cb68fc/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-09-05 15:30 ` Michal Simek
@ 2013-09-05 16:05 ` Albert ARIBAUD
2013-09-06 8:11 ` Michal Simek
0 siblings, 1 reply; 7+ messages in thread
From: Albert ARIBAUD @ 2013-09-05 16:05 UTC (permalink / raw)
To: u-boot
Hi Michal,
On Thu, 05 Sep 2013 17:30:54 +0200, Michal Simek <monstr@monstr.eu>
wrote:
> Hi Albert,
>
> On 09/05/2013 03:03 PM, Albert ARIBAUD wrote:
> > Hi Michal,
> >
> > On Thu, 25 Jul 2013 16:16:46 +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>
> >> ---
> >> This patch was sent to ML as RFC (May 9)
> >>
> >> Here is the origin response in connection to 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.
> >>
> >> ---
> >> arch/arm/cpu/u-boot.lds | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> >> index 3037885..8894c8a 100644
> >> --- a/arch/arm/cpu/u-boot.lds
> >> +++ b/arch/arm/cpu/u-boot.lds
> >> @@ -113,4 +113,6 @@ SECTIONS
> >> /DISCARD/ : { *(.plt*) }
> >> /DISCARD/ : { *(.interp*) }
> >> /DISCARD/ : { *(.gnu*) }
> >> + /DISCARD/ : { *(.ARM.exidx*) }
> >> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
> >> }
> >> --
> >> 1.8.2.3
> >>
> >
> > The good news is, it applies and does not cause any build issues.
> >
> > The less good news is, arch/arm/cpu/u-boot.lds is not the only linker
> > script file to fix if we want to fix it this way.
> >
> > The fact is, I am not sure removing sections from the ELF filein order
> > to avoid them being in the binary is actually the right way to go. I
> > have recently had to 'un-discard' some sections in order for
> > 'offline' debugging tools to properly understand the ELF file.
> >
> > So I am wondering if we should not stop using /DISCARD/ and start using
> > $(CROSS_COMPILE)objcopy options (-j or --strip-* and --remove-section).
> >
> > This way, the ELF file would be as complete as any debug tool might
> > expect it (e.g. objdump, especially when debugging relocation issues)
> > yet the binary file would remain unchanged.
> >
> > But past rc2 is not a time to start such a change.
> >
> > Still, I'd like your fix to be consistent across all of ARM. Can you
> > change all the linker scripts used for build ARM targets? These are,
> > according to an ugly mix of cat LOG/*.MAKELOG, sed, grep and sort -u:
> >
> > arch/arm/cpu/arm1136/u-boot-spl.lds
> > arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
> > arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
> > arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
> > arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
> > arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
> > arch/arm/cpu/ixp/u-boot.lds
> > arch/arm/cpu/u-boot.lds
> > arch/arm/cpu/u-boot-spl.lds
> > board/actux1/u-boot.lds
> > board/actux2/u-boot.lds
> > board/actux3/u-boot.lds
> > board/ait/cam_enc_4xx/u-boot-spl.lds
> > board/davinci/da8xxevm/u-boot-spl-da850evm.lds
> > board/davinci/da8xxevm/u-boot-spl-hawk.lds
> > board/dvlhost/u-boot.lds
> > board/freescale/mx31ads/u-boot.lds
> > board/samsung/common/exynos-uboot-spl.lds
> > board/ti/am335x/u-boot.lds
> > board/vpac270/u-boot-spl.lds
>
> Honestly for me is much easier just fix our timer code not to use this section
> instead of trying to fix 3rd party platforms.
I was only asking. I did not intend to force any work upon you. As I
said, we're past -rc2.
So, I'll just pick it as-is. Will your timer code go into mainline
soon? This would ensure that a build failure would be detected
immediately if the change was reverted by any later commit such as the
"make a full ELF and a slashed .bin" change I have mentioned.
> Is there any reason why too many linkers scripts are in u-boot for ARM?
Yes: copy-paste. :)
More seriously, when start.o files started popping in different places
for different ARM targets, this was handled by duplicating .lds files
and changing the start.o location in each .lds. Then it got worse when
some targets starting needing different memory region mappings.
I am working on reducing both the start.o and lds mess. I was initially
aiming for 2013.10, will do it for 2014.01.
> Thanks,
> Michal
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-07-25 14:16 [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables Michal Simek
2013-09-05 13:03 ` Albert ARIBAUD
@ 2013-09-05 19:16 ` Albert ARIBAUD
2013-09-06 8:12 ` Michal Simek
1 sibling, 1 reply; 7+ messages in thread
From: Albert ARIBAUD @ 2013-09-05 19:16 UTC (permalink / raw)
To: u-boot
Hi Michal,
On Thu, 25 Jul 2013 16:16:46 +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>
> ---
> This patch was sent to ML as RFC (May 9)
>
> Here is the origin response in connection to 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.
>
> ---
> arch/arm/cpu/u-boot.lds | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> index 3037885..8894c8a 100644
> --- a/arch/arm/cpu/u-boot.lds
> +++ b/arch/arm/cpu/u-boot.lds
> @@ -113,4 +113,6 @@ SECTIONS
> /DISCARD/ : { *(.plt*) }
> /DISCARD/ : { *(.interp*) }
> /DISCARD/ : { *(.gnu*) }
> + /DISCARD/ : { *(.ARM.exidx*) }
> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
> }
> --
> 1.8.2.3
>
Applied to u-boot-arm/master, thanks!
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-09-05 16:05 ` Albert ARIBAUD
@ 2013-09-06 8:11 ` Michal Simek
0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2013-09-06 8:11 UTC (permalink / raw)
To: u-boot
Hi,
On 09/05/2013 06:05 PM, Albert ARIBAUD wrote:
> Hi Michal,
>
> On Thu, 05 Sep 2013 17:30:54 +0200, Michal Simek <monstr@monstr.eu>
> wrote:
>
>> Hi Albert,
>>
>> On 09/05/2013 03:03 PM, Albert ARIBAUD wrote:
>>> Hi Michal,
>>>
>>> On Thu, 25 Jul 2013 16:16:46 +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>
>>>> ---
>>>> This patch was sent to ML as RFC (May 9)
>>>>
>>>> Here is the origin response in connection to 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.
>>>>
>>>> ---
>>>> arch/arm/cpu/u-boot.lds | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
>>>> index 3037885..8894c8a 100644
>>>> --- a/arch/arm/cpu/u-boot.lds
>>>> +++ b/arch/arm/cpu/u-boot.lds
>>>> @@ -113,4 +113,6 @@ SECTIONS
>>>> /DISCARD/ : { *(.plt*) }
>>>> /DISCARD/ : { *(.interp*) }
>>>> /DISCARD/ : { *(.gnu*) }
>>>> + /DISCARD/ : { *(.ARM.exidx*) }
>>>> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
>>>> }
>>>> --
>>>> 1.8.2.3
>>>>
>>>
>>> The good news is, it applies and does not cause any build issues.
>>>
>>> The less good news is, arch/arm/cpu/u-boot.lds is not the only linker
>>> script file to fix if we want to fix it this way.
>>>
>>> The fact is, I am not sure removing sections from the ELF filein order
>>> to avoid them being in the binary is actually the right way to go. I
>>> have recently had to 'un-discard' some sections in order for
>>> 'offline' debugging tools to properly understand the ELF file.
>>>
>>> So I am wondering if we should not stop using /DISCARD/ and start using
>>> $(CROSS_COMPILE)objcopy options (-j or --strip-* and --remove-section).
>>>
>>> This way, the ELF file would be as complete as any debug tool might
>>> expect it (e.g. objdump, especially when debugging relocation issues)
>>> yet the binary file would remain unchanged.
>>>
>>> But past rc2 is not a time to start such a change.
>>>
>>> Still, I'd like your fix to be consistent across all of ARM. Can you
>>> change all the linker scripts used for build ARM targets? These are,
>>> according to an ugly mix of cat LOG/*.MAKELOG, sed, grep and sort -u:
>>>
>>> arch/arm/cpu/arm1136/u-boot-spl.lds
>>> arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
>>> arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
>>> arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
>>> arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
>>> arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
>>> arch/arm/cpu/ixp/u-boot.lds
>>> arch/arm/cpu/u-boot.lds
>>> arch/arm/cpu/u-boot-spl.lds
>>> board/actux1/u-boot.lds
>>> board/actux2/u-boot.lds
>>> board/actux3/u-boot.lds
>>> board/ait/cam_enc_4xx/u-boot-spl.lds
>>> board/davinci/da8xxevm/u-boot-spl-da850evm.lds
>>> board/davinci/da8xxevm/u-boot-spl-hawk.lds
>>> board/dvlhost/u-boot.lds
>>> board/freescale/mx31ads/u-boot.lds
>>> board/samsung/common/exynos-uboot-spl.lds
>>> board/ti/am335x/u-boot.lds
>>> board/vpac270/u-boot-spl.lds
>>
>> Honestly for me is much easier just fix our timer code not to use this section
>> instead of trying to fix 3rd party platforms.
>
> I was only asking. I did not intend to force any work upon you. As I
> said, we're past -rc2.
>
> So, I'll just pick it as-is. Will your timer code go into mainline
> soon? This would ensure that a build failure would be detected
> immediately if the change was reverted by any later commit such as the
> "make a full ELF and a slashed .bin" change I have mentioned.
The timer code is there but only in one configuration there is this issue.
It is not causing build failure. It is just when you create xilinx specific
boot image then you face with this problem.
>
>> Is there any reason why too many linkers scripts are in u-boot for ARM?
>
> Yes: copy-paste. :)
:-)
> More seriously, when start.o files started popping in different places
> for different ARM targets, this was handled by duplicating .lds files
> and changing the start.o location in each .lds. Then it got worse when
> some targets starting needing different memory region mappings.
especially because of SPL.
>
> I am working on reducing both the start.o and lds mess. I was initially
> aiming for 2013.10, will do it for 2014.01.
Great.
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/20130906/6c289ab8/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
2013-09-05 19:16 ` Albert ARIBAUD
@ 2013-09-06 8:12 ` Michal Simek
0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2013-09-06 8:12 UTC (permalink / raw)
To: u-boot
On 09/05/2013 09:16 PM, Albert ARIBAUD wrote:
> Hi Michal,
>
> On Thu, 25 Jul 2013 16:16:46 +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>
>> ---
>> This patch was sent to ML as RFC (May 9)
>>
>> Here is the origin response in connection to 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.
>>
>> ---
>> arch/arm/cpu/u-boot.lds | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
>> index 3037885..8894c8a 100644
>> --- a/arch/arm/cpu/u-boot.lds
>> +++ b/arch/arm/cpu/u-boot.lds
>> @@ -113,4 +113,6 @@ SECTIONS
>> /DISCARD/ : { *(.plt*) }
>> /DISCARD/ : { *(.interp*) }
>> /DISCARD/ : { *(.gnu*) }
>> + /DISCARD/ : { *(.ARM.exidx*) }
>> + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
>> }
>> --
>> 1.8.2.3
>>
>
> Applied to u-boot-arm/master, thanks!
>
Ok. 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/20130906/f590099a/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-09-06 8:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 14:16 [U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables Michal Simek
2013-09-05 13:03 ` Albert ARIBAUD
2013-09-05 15:30 ` Michal Simek
2013-09-05 16:05 ` Albert ARIBAUD
2013-09-06 8:11 ` Michal Simek
2013-09-05 19:16 ` Albert ARIBAUD
2013-09-06 8:12 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox