mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] i386, x86_64: Set the symbol type for the START function.
@ 2024-11-23  0:19 Alex Rønne Petersen
  2025-02-22  0:30 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Rønne Petersen @ 2024-11-23  0:19 UTC (permalink / raw)
  To: musl; +Cc: Alex Rønne Petersen

As for other architectures. Noticed this while running Zig's gen_stubs.zig tool.
---
 arch/i386/crt_arch.h   | 1 +
 arch/x86_64/crt_arch.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/i386/crt_arch.h b/arch/i386/crt_arch.h
index 43c8477a..1a80fce3 100644
--- a/arch/i386/crt_arch.h
+++ b/arch/i386/crt_arch.h
@@ -3,6 +3,7 @@ __asm__(
 ".weak _DYNAMIC \n"
 ".hidden _DYNAMIC \n"
 ".global " START "\n"
+".type " START ",%function \n"
 START ":\n"
 "	xor %ebp,%ebp \n"
 "	mov %esp,%eax \n"
diff --git a/arch/x86_64/crt_arch.h b/arch/x86_64/crt_arch.h
index 3eec61bd..b1c9c476 100644
--- a/arch/x86_64/crt_arch.h
+++ b/arch/x86_64/crt_arch.h
@@ -1,6 +1,7 @@
 __asm__(
 ".text \n"
 ".global " START " \n"
+".type " START ",%function \n"
 START ": \n"
 "	xor %rbp,%rbp \n"
 "	mov %rsp,%rdi \n"
-- 
2.40.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] [PATCH] i386, x86_64: Set the symbol type for the START function.
  2024-11-23  0:19 [musl] [PATCH] i386, x86_64: Set the symbol type for the START function Alex Rønne Petersen
@ 2025-02-22  0:30 ` Rich Felker
  2025-02-22  0:40   ` Alex Rønne Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Felker @ 2025-02-22  0:30 UTC (permalink / raw)
  To: Alex Rønne Petersen; +Cc: musl

On Sat, Nov 23, 2024 at 01:19:51AM +0100, Alex Rønne Petersen wrote:
> As for other architectures. Noticed this while running Zig's gen_stubs.zig tool.
> ---
>  arch/i386/crt_arch.h   | 1 +
>  arch/x86_64/crt_arch.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/i386/crt_arch.h b/arch/i386/crt_arch.h
> index 43c8477a..1a80fce3 100644
> --- a/arch/i386/crt_arch.h
> +++ b/arch/i386/crt_arch.h
> @@ -3,6 +3,7 @@ __asm__(
>  ".weak _DYNAMIC \n"
>  ".hidden _DYNAMIC \n"
>  ".global " START "\n"
> +".type " START ",%function \n"
>  START ":\n"
>  "	xor %ebp,%ebp \n"
>  "	mov %esp,%eax \n"
> diff --git a/arch/x86_64/crt_arch.h b/arch/x86_64/crt_arch.h
> index 3eec61bd..b1c9c476 100644
> --- a/arch/x86_64/crt_arch.h
> +++ b/arch/x86_64/crt_arch.h
> @@ -1,6 +1,7 @@
>  __asm__(
>  ".text \n"
>  ".global " START " \n"
> +".type " START ",%function \n"
>  START ": \n"
>  "	xor %rbp,%rbp \n"
>  "	mov %rsp,%rdi \n"
> -- 
> 2.40.1

Looks ok but was missing x32. I'll add it when merging.

Rich

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] [PATCH] i386, x86_64: Set the symbol type for the START function.
  2025-02-22  0:30 ` Rich Felker
@ 2025-02-22  0:40   ` Alex Rønne Petersen
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Rønne Petersen @ 2025-02-22  0:40 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl

On Sat, Feb 22, 2025 at 1:30 AM Rich Felker <dalias@libc.org> wrote:
>
> On Sat, Nov 23, 2024 at 01:19:51AM +0100, Alex Rønne Petersen wrote:
> > As for other architectures. Noticed this while running Zig's gen_stubs.zig tool.
> > ---
> >  arch/i386/crt_arch.h   | 1 +
> >  arch/x86_64/crt_arch.h | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/arch/i386/crt_arch.h b/arch/i386/crt_arch.h
> > index 43c8477a..1a80fce3 100644
> > --- a/arch/i386/crt_arch.h
> > +++ b/arch/i386/crt_arch.h
> > @@ -3,6 +3,7 @@ __asm__(
> >  ".weak _DYNAMIC \n"
> >  ".hidden _DYNAMIC \n"
> >  ".global " START "\n"
> > +".type " START ",%function \n"
> >  START ":\n"
> >  "    xor %ebp,%ebp \n"
> >  "    mov %esp,%eax \n"
> > diff --git a/arch/x86_64/crt_arch.h b/arch/x86_64/crt_arch.h
> > index 3eec61bd..b1c9c476 100644
> > --- a/arch/x86_64/crt_arch.h
> > +++ b/arch/x86_64/crt_arch.h
> > @@ -1,6 +1,7 @@
> >  __asm__(
> >  ".text \n"
> >  ".global " START " \n"
> > +".type " START ",%function \n"
> >  START ": \n"
> >  "    xor %rbp,%rbp \n"
> >  "    mov %rsp,%rdi \n"
> > --
> > 2.40.1
>
> Looks ok but was missing x32. I'll add it when merging.

Oops, I sent a v2 of the patch that includes x32, but didn't send it
as a reply to this one, sorry.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-22  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-23  0:19 [musl] [PATCH] i386, x86_64: Set the symbol type for the START function Alex Rønne Petersen
2025-02-22  0:30 ` Rich Felker
2025-02-22  0:40   ` Alex Rønne Petersen

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).