From: Antony Pavlov <antonynpavlov@gmail.com>
To: Andrey Korolyov <andrey@xdel.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC v3 2/2] Add initial RISC-V architecture support
Date: Tue, 13 Dec 2016 23:48:49 +0300 [thread overview]
Message-ID: <20161213234849.0204a5537c12767ea2b1de41@gmail.com> (raw)
In-Reply-To: <CABYiri8yCVdtXtg7SN3OOW3h2X-bdtgJsr3VircCo-4fLTGg6Q@mail.gmail.com>
On Tue, 13 Dec 2016 20:02:41 +0300
Andrey Korolyov <andrey@xdel.ru> wrote:
> > +CONFIG_TEXT_BASE=0x80000000
> > +CONFIG_MEMORY_LAYOUT_FIXED=y
> > +CONFIG_STACK_BASE=0x807f0000
> > +CONFIG_STACK_SIZE=0x10000
> > +CONFIG_MALLOC_BASE=0x80800000
>
> Due to changed offsets in e300/u500 configurations (as compared to v2-
> qemu config) linkage fails with binutils-2.25.1 and gcc-5.3.0:
>
> arch/riscv/boot/built-in.o: In function `main_entry':
> /build/barebox/arch/riscv/boot/main_entry.c:34:(.text+0x0): relocation
> truncated to fit: R_RISCV_HI20 against symbol `__bss_start' defined in
> .bss section in barebox
> Makefile:756: recipe for target 'barebox' failed
You can fix the problem by explicitly selecting the 'Medium/Anywhere' gcc code model,
e.g.
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -2,7 +2,7 @@ CPPFLAGS += -fno-strict-aliasing
cflags-y += -fno-pic -pipe
cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main
+ -Wno-uninitialized -Wno-format -Wno-main -mcmodel=medany
LDFLAGS += $(ldflags-y)
LDFLAGS_barebox += -nostdlib
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2016-12-13 20:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 1:01 [RFC v3 0/2] add " Antony Pavlov
2016-12-12 1:01 ` [RFC v3 1/2] serial: add driver for SiFive UART Antony Pavlov
2016-12-12 1:01 ` [RFC v3 2/2] Add initial RISC-V architecture support Antony Pavlov
2016-12-13 17:02 ` Andrey Korolyov
2016-12-13 20:48 ` Antony Pavlov [this message]
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=20161213234849.0204a5537c12767ea2b1de41@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=andrey@xdel.ru \
--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