diff mbox series

Restore ENTRY_POINT definition on hppa, ia64 (bug 28749)

Message ID 87zgo79b0l.fsf@oldenburg.str.redhat.com
State Committed
Commit 6b0978c14acc2a6b5f5dbd8e8ef75fddc6656483
Headers show
Series Restore ENTRY_POINT definition on hppa, ia64 (bug 28749) | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Florian Weimer Jan. 7, 2022, 8:59 a.m. UTC
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(+)

Comments

Adhemerval Zanella Jan. 7, 2022, 1:43 p.m. UTC | #1
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
>
diff mbox series

Patch

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