From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/7] examples: rename __start to _start on MIPS
Date: Thu, 23 Apr 2020 19:52:25 +0200 [thread overview]
Message-ID: <aad059da-bc2c-c991-4599-54c47a350dc8@gmail.com> (raw)
In-Reply-To: <20200420223418.117186-3-mhorne@FreeBSD.org>
+cc Wolfgang, Tom
Am 21.04.20 um 00:34 schrieb mhorne at FreeBSD.org:
> From: Mitchell Horne <mhorne@FreeBSD.org>
>
> On MIPS, __start marks the entry point to the CONFIG_API demo program.
> Change the name to _start, to be consistent with all other
> architectures.
>
> Signed-off-by: Mitchell Horne <mhorne@FreeBSD.org>
> ---
> examples/api/crt0.S | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/examples/api/crt0.S b/examples/api/crt0.S
> index 57bba9d851..2f75f5a036 100644
> --- a/examples/api/crt0.S
> +++ b/examples/api/crt0.S
> @@ -42,12 +42,12 @@ syscall:
> #elif defined(CONFIG_MIPS)
> #include <asm/asm.h>
> .text
> - .globl __start
> - .ent __start
> -__start:
> + .globl _start
> + .ent _start
> +_start:
> PTR_S $sp, search_hint
> b main
> - .end __start
> + .end _start
>
> .globl syscall
> .ent syscall
>
__start is used by the default binutils linker script for MIPS. For a
test you could simply do a "make malta_defconfig", enable CONFIG_API via
menuconfig and build. Without this patch you'll get:
$ /opt/gcc-9.2.0-nolibc/mips-linux/bin/mips-linux-readelf -s
examples/api/demo | grep __start
64: 80200700 16 FUNC GLOBAL DEFAULT 1 __start
But with this patch __start will now an unresolved symbol:
$ /opt/gcc-9.2.0-nolibc/mips-linux/bin/mips-linux-readelf -s
examples/api/demo | grep __start
19: 00000000 0 NOTYPE GLOBAL DEFAULT UND __start
But I'm not sure if the original intention was to use the default linker
script or the one provided by U-Boot and if examples/api/ should use the
same compiler and linker flags as example/standalone/. Some archs have
used a custom linker script. Maybe Wolfgang knows more?
--
- Daniel
next prev parent reply other threads:[~2020-04-23 17:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 22:34 [PATCH 0/7] Add support for CONFIG_API on RISC-V mhorne at FreeBSD.org
2020-04-20 22:34 ` [PATCH 1/7] examples: generate demo.bin mhorne at FreeBSD.org
2020-04-23 14:18 ` Bin Meng
2020-04-20 22:34 ` [PATCH 2/7] examples: rename __start to _start on MIPS mhorne at FreeBSD.org
2020-04-23 14:18 ` Bin Meng
2020-04-23 17:52 ` Daniel Schwierzeck [this message]
2020-04-23 20:43 ` Wolfgang Denk
2020-04-20 22:34 ` [PATCH 3/7] examples: add a linker script for the API demo mhorne at FreeBSD.org
2020-04-23 14:18 ` Bin Meng
2020-04-20 22:34 ` [PATCH 4/7] examples: fix the type of search_hint mhorne at FreeBSD.org
2020-04-23 14:18 ` Bin Meng
2020-04-20 22:34 ` [PATCH 5/7] examples: fix incompatible type casts mhorne at FreeBSD.org
2020-04-23 14:18 ` Bin Meng
2020-04-20 22:34 ` [PATCH 6/7] riscv: add CONFIG_API support mhorne at FreeBSD.org
2020-04-23 14:19 ` Bin Meng
2020-04-20 22:34 ` [PATCH 7/7] api: enumerate virtio-blk devices mhorne at FreeBSD.org
2020-04-23 14:19 ` Bin Meng
2020-04-24 16:52 ` [PATCH 0/7] Add support for CONFIG_API on RISC-V Tom Rini
2020-04-24 20:46 ` Mitchell Horne
2020-04-24 20:52 ` Tom Rini
2020-04-25 7:30 ` Heinrich Schuchardt
2020-06-22 12:54 ` Mitchell Horne
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=aad059da-bc2c-c991-4599-54c47a350dc8@gmail.com \
--to=daniel.schwierzeck@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox