* [U-Boot] ARM : Removing unwind dummy functions
@ 2012-10-18 20:14 Gabriel Huau
2012-10-18 23:02 ` [U-Boot] Debugging (was: ARM : Removing unwind dummy functions) Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Huau @ 2012-10-18 20:14 UTC (permalink / raw)
To: u-boot
Hi,
I would like to know if it's really necessary to keep the dummy
functions in arch/arm/lib/eabi_compat.c.
These function should not be happen in our case (that why the body is
empty).
They have been introduced due to problems with some toolchains that was
referencing these functions. But we can avoid this hack by adding the
option '-fno-unwind-tables' at the compilation time no ? (correct me if
I'm wrong).
Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Debugging (was: ARM : Removing unwind dummy functions)
2012-10-18 20:14 [U-Boot] ARM : Removing unwind dummy functions Gabriel Huau
@ 2012-10-18 23:02 ` Albert ARIBAUD
2012-10-18 23:56 ` Tom Rini
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2012-10-18 23:02 UTC (permalink / raw)
To: u-boot
Hi Gabriel,
On Thu, 18 Oct 2012 22:14:14 +0200, Gabriel Huau
<contact@huau-gabriel.fr> wrote:
> Hi,
>
> I would like to know if it's really necessary to keep the dummy
> functions in arch/arm/lib/eabi_compat.c.
>
> These function should not be happen in our case (that why the body is
> empty).
>
> They have been introduced due to problems with some toolchains that was
> referencing these functions. But we can avoid this hack by adding the
> option '-fno-unwind-tables' at the compilation time no ? (correct me if
> I'm wrong).
We can do this, but then we lose some potentially helpful debug info.
OTOH, this debug info is not useful in production.
Which leads to a more general question: what about options for
debugging less basic than #define'ing DEBUG ? (my favorite, and one
a few people share I believe, is the ability to build an U-Boot that can
be loaded and run from RAM, i.e. without the CPU critical inits, and
possibly also without relocation. These features could be made
available through debug options such as DEBUG_SKIP_CRITICAL_INIT or
DEBUG_SKIP_RELOCATION).
Here we could have DEBUG_ARM_UNWIND_SUPPORT: if undefined, option
-fno-unwind-tables is added to compilers which understand it and unwind
helper functions are not compiled, and if defined, helpers are compiled.
Of course, debug options could be *tested* in the code and *documented*
in doc/README.debug-options, but their *definition* would be forbidden
in committed code; they would be allowed only in the working directory.
Thoughts?
> Best regards,
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Debugging (was: ARM : Removing unwind dummy functions)
2012-10-18 23:02 ` [U-Boot] Debugging (was: ARM : Removing unwind dummy functions) Albert ARIBAUD
@ 2012-10-18 23:56 ` Tom Rini
0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2012-10-18 23:56 UTC (permalink / raw)
To: u-boot
On Fri, Oct 19, 2012 at 01:02:41AM +0200, Albert ARIBAUD wrote:
> Hi Gabriel,
>
> On Thu, 18 Oct 2012 22:14:14 +0200, Gabriel Huau
> <contact@huau-gabriel.fr> wrote:
>
> > Hi,
> >
> > I would like to know if it's really necessary to keep the dummy
> > functions in arch/arm/lib/eabi_compat.c.
> >
> > These function should not be happen in our case (that why the body is
> > empty).
> >
> > They have been introduced due to problems with some toolchains that was
> > referencing these functions. But we can avoid this hack by adding the
> > option '-fno-unwind-tables' at the compilation time no ? (correct me if
> > I'm wrong).
>
> We can do this, but then we lose some potentially helpful debug info.
> OTOH, this debug info is not useful in production.
>
> Which leads to a more general question: what about options for
> debugging less basic than #define'ing DEBUG ? (my favorite, and one
> a few people share I believe, is the ability to build an U-Boot that can
> be loaded and run from RAM, i.e. without the CPU critical inits, and
> possibly also without relocation. These features could be made
> available through debug options such as DEBUG_SKIP_CRITICAL_INIT or
> DEBUG_SKIP_RELOCATION).
I don't like these. Disabling relocation is on the "why?" side for me.
Any modern debugger has the ability to adjust symbol offsets and U-Boot
will tell you (bdinfo or with the debug print) what you need. You can
even get at it via the debugger prior to relocation. In the case where
you don't have a JTAG header, it's not hard to run U-Boot from RAM from
U-Boot (or whatever you can run it from), if you can't get real boot-up
loading from something other than flash.
> Here we could have DEBUG_ARM_UNWIND_SUPPORT: if undefined, option
> -fno-unwind-tables is added to compilers which understand it and unwind
> helper functions are not compiled, and if defined, helpers are compiled.
Well, here's something I just poked at. If we switch to
-ffunction-section/-fdata-sections and --gc-sections like other arches
we can just drop this outright. SPL is already discarding it and a
quick test shows I can even not build it.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121018/acf5ea37/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-18 23:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 20:14 [U-Boot] ARM : Removing unwind dummy functions Gabriel Huau
2012-10-18 23:02 ` [U-Boot] Debugging (was: ARM : Removing unwind dummy functions) Albert ARIBAUD
2012-10-18 23:56 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox