mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] arm: do section garbage collection also with modules enabled
Date: Wed, 17 Dec 2014 11:58:21 +0100	[thread overview]
Message-ID: <1418813901-24229-3-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1418813901-24229-1-git-send-email-l.stach@pengutronix.de>

A lot of the arm build (especially PBL stuff) depends on section
garbage collection to be enabled. If it is disabled a lot of targets fail
to link properly. If module support is enabled garbage collection was
disabled on the premise that we throw away too many function which may be
needed in later modules.

The proper way to keep the functions around for use in modules, which
already works, is to annotate them with EXPORT_SYMBOL.

As module support is still marked as experimental I think it's reasonable
to expect users to make sure all symbols that are used by their modules
are properly annotated.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index cf81c9c08332..193f731e9039 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -105,11 +105,9 @@ TEXT_BASE = $(CONFIG_TEXT_BASE)
 
 CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
 
-ifndef CONFIG_MODULES
 # Add cleanup flags
 CPPFLAGS += -fdata-sections -ffunction-sections
 LDFLAGS_barebox += -static --gc-sections
-endif
 
 ifdef CONFIG_RELOCATABLE
 LDFLAGS_barebox += -pie
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-12-17 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 10:58 [PATCH 1/3] arm: include relevant headers in barebox-arm Lucas Stach
2014-12-17 10:58 ` [PATCH 2/3] arm: edmqmx6: build entry in lwl target Lucas Stach
2014-12-17 10:58 ` Lucas Stach [this message]
2014-12-17 12:47 ` [PATCH 1/3] arm: include relevant headers in barebox-arm Sascha Hauer

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=1418813901-24229-3-git-send-email-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox