public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Restore ENTRY_POINT definition on hppa, ia64 (bug 28749)
@ 2022-01-07  8:59 Florian Weimer
  2022-01-07 13:43 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2022-01-07  8:59 UTC (permalink / raw)
  To: libc-alpha; +Cc: danglin

ENTRY_POINT is still needed for elf/rtld.c.  Fixes commit 4fb4e7e821e3
("csu: Always use __executable_start in gmon-start.c").

---
 sysdeps/hppa/entry.h | 8 ++++++++
 sysdeps/ia64/entry.h | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/sysdeps/hppa/entry.h b/sysdeps/hppa/entry.h
new file mode 100644
index 0000000000..f88bb5689d
--- /dev/null
+++ b/sysdeps/hppa/entry.h
@@ -0,0 +1,8 @@
+extern void _start (void);
+
+/* Lives in libgcc.so and canonicalizes function pointers for comparison.  */
+extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr);
+
+/* The function's entry point is stored in the first word of the
+   function descriptor (plabel) of _start().  */
+#define ENTRY_POINT __canonicalize_funcptr_for_compare((unsigned int)_start)
diff --git a/sysdeps/ia64/entry.h b/sysdeps/ia64/entry.h
new file mode 100644
index 0000000000..9ae8b8615c
--- /dev/null
+++ b/sysdeps/ia64/entry.h
@@ -0,0 +1,8 @@
+#include <link.h>
+#include <dl-fptr.h>
+
+extern void _start (void);
+
+/* The function's entry point is stored in the first word of the
+   function descriptor (plabel) of _start().  */
+#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip


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

* Re: [PATCH] Restore ENTRY_POINT definition on hppa, ia64 (bug 28749)
  2022-01-07  8:59 [PATCH] Restore ENTRY_POINT definition on hppa, ia64 (bug 28749) Florian Weimer
@ 2022-01-07 13:43 ` Adhemerval Zanella
  0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2022-01-07 13:43 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha; +Cc: danglin



On 07/01/2022 05:59, Florian Weimer via Libc-alpha wrote:
> ENTRY_POINT is still needed for elf/rtld.c.  Fixes commit 4fb4e7e821e3
> ("csu: Always use __executable_start in gmon-start.c").

LGTM, thanks.

> 
> ---
>  sysdeps/hppa/entry.h | 8 ++++++++
>  sysdeps/ia64/entry.h | 8 ++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/sysdeps/hppa/entry.h b/sysdeps/hppa/entry.h
> new file mode 100644
> index 0000000000..f88bb5689d
> --- /dev/null
> +++ b/sysdeps/hppa/entry.h
> @@ -0,0 +1,8 @@
> +extern void _start (void);
> +
> +/* Lives in libgcc.so and canonicalizes function pointers for comparison.  */
> +extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr);
> +
> +/* The function's entry point is stored in the first word of the
> +   function descriptor (plabel) of _start().  */
> +#define ENTRY_POINT __canonicalize_funcptr_for_compare((unsigned int)_start)
> diff --git a/sysdeps/ia64/entry.h b/sysdeps/ia64/entry.h
> new file mode 100644
> index 0000000000..9ae8b8615c
> --- /dev/null
> +++ b/sysdeps/ia64/entry.h
> @@ -0,0 +1,8 @@
> +#include <link.h>
> +#include <dl-fptr.h>
> +
> +extern void _start (void);
> +
> +/* The function's entry point is stored in the first word of the
> +   function descriptor (plabel) of _start().  */
> +#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip
> 

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

end of thread, other threads:[~2022-01-07 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07  8:59 [PATCH] Restore ENTRY_POINT definition on hppa, ia64 (bug 28749) Florian Weimer
2022-01-07 13:43 ` Adhemerval Zanella

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 read-only IMAP folder(s) and NNTP newsgroup(s).