All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Switch from archive libraries to partial linking
Date: Mon, 24 Jan 2011 18:03:50 -0600	[thread overview]
Message-ID: <356989C7-FA92-46D5-9FB6-5F9332ECBFD5@kernel.crashing.org> (raw)
In-Reply-To: <AANLkTin587yZUJwMTYrnGPjX92gBdcpcJHYtvL_0NWbO@mail.gmail.com>


On Jan 24, 2011, at 2:54 PM, Timur Tabi wrote:

> On Mon, Nov 8, 2010 at 4:04 PM, Sebastien Carlier
> <sebastien.carlier@gmail.com> wrote:
>> NOTE: This does not include the actual patch as it is too large for the mailing list (418 kB).
>> 
>> Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries
>> when linking with recent versions of binutils.  As stated in the System V ABI, "the link editor does
>> not extract archive members to resolve undefined weak symbols".
>> 
>> This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives,
>> which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols
>> as intended.  This approach is also used by Linux, from which the gmake function cmd_link_o_target
>> (added at the end of config.mk and used in all Makefiles) is inspired.
>> 
>> The name of each former library archive is preserved except for extensions which change from ".a" to
>> ".o".  This commit updates references accordingly where needed, in particular in some linker scripts.
>> 
>> This commit reveals board configurations that exclude some module but not all of its dependencies; for
>> example, disabling CMD_NET but not CMD_NFS results in undefined symbols at link time.
>> 
>> Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
> 
> git-bisect tells me that your patch (or whatever version of it was
> actually applied) causes this linker warning:
> 
> powerpc-linux-gnu-ld: Warning: lib_powerpc/fpu/libpostpowerpcfpu.o
> uses hard float, libpost.o uses soft float
> 
> See this thread for details:
> http://lists.denx.de/pipermail/u-boot/2011-January/085811.html
> 
> I have no idea how to fix this.

The issue is that the code under post/lib_powerpc/fpu/* is compiled with:

CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//)
CFLAGS += -mhard-float -fkeep-inline-functions

We need to see if we can avoid building the whole post/lib_powerpc/fpu/* dir if CONFIG_POST_FPU isn't set in CONFIG_POST.

- k

  reply	other threads:[~2011-01-25  0:03 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 22:04 [U-Boot] [PATCH] Switch from archive libraries to partial linking Sebastien Carlier
2010-11-08 22:10 ` Graeme Russ
2010-11-08 22:34   ` Sebastien Carlier
2010-11-09  6:17 ` Andreas Bießmann
2010-11-09  9:15 ` Andre Schwarz
2010-11-09 17:44   ` [U-Boot] [PATCH v2] " Sebastien Carlier
2010-11-10  8:35     ` Andre Schwarz
2010-11-09  9:48 ` [U-Boot] [PATCH] " Graeme Russ
2010-11-09 11:29 ` Stefano Babic
2010-11-10  6:57 ` Mike Frysinger
2010-11-10  8:01   ` Andreas Bießmann
2010-11-10  8:07   ` [U-Boot] [PATCH v3] " Sebastien Carlier
2010-11-10  8:55     ` Mike Frysinger
2010-11-10 12:24       ` Sebastien Carlier
2010-11-10 21:07         ` Mike Frysinger
2010-11-15  7:51     ` Wolfgang Denk
2010-11-15  8:09       ` Sebastien Carlier
2010-11-15 10:54         ` Wolfgang Denk
2010-11-15 11:33           ` Mike Frysinger
2010-11-15 12:38             ` Mike Frysinger
2010-11-15 12:42               ` Mike Frysinger
2010-11-15 12:52               ` Mike Frysinger
2010-11-15 11:35           ` [U-Boot] [PATCH v4] " Sebastien Carlier
2010-11-15 12:13           ` Sebastien Carlier
2010-11-15 12:39             ` Mike Frysinger
2010-11-16 14:58               ` Detlev Zundel
2010-11-16 16:33                 ` Mike Frysinger
2010-11-17 12:30                   ` Detlev Zundel
2010-11-17 13:30           ` [U-Boot] [PATCH v3] " Sebastien Carlier
2010-11-17 13:50             ` Wolfgang Denk
2010-11-17 18:06             ` Mike Frysinger
2010-11-17 19:53               ` Sebastien Carlier
2010-11-17 22:19                 ` Mike Frysinger
2010-11-18 21:44             ` Wolfgang Denk
2010-11-18 22:08               ` Albert ARIBAUD
2010-11-18 22:33                 ` Wolfgang Denk
2010-11-19  6:36                   ` Albert ARIBAUD
2010-11-19  8:03                     ` Wolfgang Denk
2010-11-20  0:07                       ` Mike Frysinger
2010-11-20  8:38                         ` Wolfgang Denk
2010-11-20  8:48                           ` Albert ARIBAUD
2010-11-20  9:19                           ` Mike Frysinger
2010-11-19  8:04                     ` Sebastien Carlier
2010-11-19  7:50               ` Sebastien Carlier
2010-11-19  8:08                 ` Wolfgang Denk
2010-11-19  8:34                   ` Sebastien Carlier
2010-11-19 11:11                     ` Wolfgang Denk
2010-11-19 11:40                       ` Albert ARIBAUD
2010-11-19 11:48                         ` Wolfgang Denk
2010-11-19 12:11                           ` Albert ARIBAUD
2010-11-19 12:33                       ` Sebastien Carlier
2010-11-19 12:38                         ` Albert ARIBAUD
2010-11-19 13:02                           ` Sebastien Carlier
2010-11-19 13:07                             ` Reinhard Meyer
2010-11-19 13:33                               ` Albert ARIBAUD
2010-11-19 13:40                               ` Wolfgang Denk
2010-11-19 12:55                         ` Wolfgang Denk
2010-11-19  8:10                 ` Mike Frysinger
2010-11-15 19:44         ` Mike Frysinger
2010-11-15 11:44 ` [U-Boot] [PATCH] " Mike Frysinger
2011-01-24 20:54 ` Timur Tabi
2011-01-25  0:03   ` Kumar Gala [this message]
2011-01-25  6:36     ` Wolfgang Denk
2011-01-25  8:55       ` Kumar Gala
2011-01-25 16:40         ` Timur Tabi
2011-01-25 17:49           ` Kumar Gala
2011-01-25 18:30             ` Timur Tabi
2011-01-25 19:02               ` Wolfgang Denk
2011-01-25 20:05             ` Scott Wood
2011-01-25 20:19               ` Wolfgang Denk
2011-01-25 20:37                 ` Scott Wood
2011-01-25 21:13                   ` Wolfgang Denk
2011-01-26  5:22                     ` Kumar Gala
2011-01-26 17:26                       ` Scott Wood
2011-01-25 18:27           ` Wolfgang Denk
2011-01-25 18:29             ` Timur Tabi
2011-01-25 18:54               ` Wolfgang Denk
2011-01-25 18:57                 ` Timur Tabi
2011-01-25 19:05                   ` Wolfgang Denk

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=356989C7-FA92-46D5-9FB6-5F9332ECBFD5@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --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.