From: Sascha Hauer <s.hauer@pengutronix.de>
To: Kevin Du Huanpeng <u74147@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [Makefile bug] make barebox.s : dead loop
Date: Tue, 3 Dec 2013 12:25:15 +0100 [thread overview]
Message-ID: <20131203112515.GK24559@pengutronix.de> (raw)
In-Reply-To: <CANvTkNa710tfGW0=xeLwg-Qrb3YccoKui7d6zWMnio5e4CSZGg@mail.gmail.com>
Hi Kevin,
On Mon, Dec 02, 2013 at 08:27:39PM +0800, Kevin Du Huanpeng wrote:
>
> LD arch/x86/boot/built-in.o
> GEN .version
> CHK include/generated/compile.h
> UPD include/generated/compile.h
> CC common/version.o
> LD common/built-in.o
> LD barebox
> ld: section .eh_frame loaded at [000000000001605c,000000000001f01b]
> overlaps section .barebox_initcalls loaded at
> [000000000001605c,00000000000160b7]
> make: *** [barebox] Error 1
> dev@bogon:~/wr720n/bug.dis/x86$
Same here. Could you try the following patch? It resolves this for me
and the resulting image works with qemu.
Sascha
8<-------------------------------------------------------
From 5be365b6b36372466f88815b97d38bc203c6e183 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue, 3 Dec 2013 12:20:56 +0100
Subject: [PATCH] x86: Fix linker script
Do not load sections to specific addresses. This fixes linking which otherwise
fails with newer toolchains with:
/opt/OSELAS.Toolchain-2012.12.1/i586-unknown-linux-gnu/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/i586-unknown-linux-gnu-ld: section .eh_frame loaded at [0000000000015fb4,000000000001b0bf] overlaps section .barebox_initcalls loaded at [0000000000015fb4,000000000001600f]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/x86/lib/barebox.lds.S | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index 05d0f77..83e991c 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -137,7 +137,7 @@ SECTIONS
#endif
/* the main barebox part (32 bit) */
- .text : AT ( LOADADDR(.bootstrapping) + SIZEOF(.bootstrapping) ) {
+ .text : {
/* do not align here! It may fails with the LOADADDR! */
_stext = .;
_text = .;
@@ -154,38 +154,38 @@ SECTIONS
BAREBOX_BARE_INIT_SIZE
_sdata = .;
- .data : AT ( LOADADDR(.text) + SIZEOF(.text) ) {
+ .data : {
*(.data*)
. = ALIGN(4);
} > barebox
- .got : AT ( LOADADDR(.data) + SIZEOF (.data) ) {
+ .got : {
*(.got*)
. = ALIGN(4);
} > barebox
- .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) {
+ .barebox_cmd : {
__barebox_cmd_start = .;
BAREBOX_CMDS
__barebox_cmd_end = .;
. = ALIGN(4);
} > barebox
- .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) {
+ .barebox_magicvars : {
__barebox_magicvar_start = .;
BAREBOX_MAGICVARS
__barebox_magicvar_end = .;
. = ALIGN(4);
} > barebox
- .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) {
+ .barebox_initcalls : {
__barebox_initcalls_start = .;
INITCALLS
__barebox_initcalls_end = .;
. = ALIGN(4);
} > barebox
- .__usymtab : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) {
+ .__usymtab : {
__usymtab_start = .;
BAREBOX_SYMS
__usymtab_end = .;
--
1.8.4.3
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-12-03 11:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 8:22 Kevin Du Huanpeng
2013-12-02 8:36 ` Kevin Du Huanpeng
2013-12-02 9:13 ` Sascha Hauer
2013-12-02 12:27 ` Kevin Du Huanpeng
2013-12-03 11:25 ` Sascha Hauer [this message]
2013-12-04 14:17 ` Kevin Du Huanpeng
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=20131203112515.GK24559@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=u74147@gmail.com \
/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