public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited] hurd: Fix rtld link
@ 2017-09-03  2:33 Samuel Thibault
  2017-12-15 16:11 ` Thomas Schwinge
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2017-09-03  2:33 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

dl-tunables.c now uses __access_noerrno in addition to __access.

	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): New function.
---
 ChangeLog                     | 1 +
 sysdeps/mach/hurd/dl-sysdep.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0567c67675..2e6083b372 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
 	Fix <unistd.h> inclusion.
 	* sysdeps/posix/pwritev2.c: Include <errno.h>.
 	* sysdeps/posix/pwritev64v2.c: Include <errno.h>.
+	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): New function.
 
 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 6d5c1abf83..2bfa64f02a 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -557,6 +557,12 @@ __access (const char *file, int type)
   errno = ENOSYS;
   return -1;
 }
+int weak_function
+__access_noerrno (const char *file, int type)
+{
+  errno = ENOSYS;
+  return -1;
+}
 
 pid_t weak_function
 __getpid (void)
-- 
2.14.1

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

* Re: [hurd,commited] hurd: Fix rtld link
  2017-09-03  2:33 [hurd,commited] hurd: Fix rtld link Samuel Thibault
@ 2017-12-15 16:11 ` Thomas Schwinge
  2017-12-15 16:48   ` Samuel Thibault
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Schwinge @ 2017-12-15 16:11 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha

Hi Samuel!

On Sun,  3 Sep 2017 04:33:45 +0200, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> --- a/sysdeps/mach/hurd/dl-sysdep.c
> +++ b/sysdeps/mach/hurd/dl-sysdep.c

> +int weak_function
> +__access_noerrno (const char *file, int type)
> +{
> +  errno = ENOSYS;
> +  return -1;
> +}

I just stumbled across this -- OK to push the following?  Note that I
have not tested this.  If approving this, please respond with
"Reviewed-by: NAME <EMAIL>" so that your effort will be recorded.  See
<https://gcc.gnu.org/wiki/Reviewed-by>.

commit 336e16f8e6a588ba048997722a114f9d4462dbdb
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Dec 15 17:00:50 2017 +0100

    Don't set errno in Hurd rtld's __access_noerrno
    
            * sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): Don't set
            errno.
    
    Fixes commit 819ea3347e3a30a611488ceeec53650baaeb7961.
---
 sysdeps/mach/hurd/dl-sysdep.c | 1 -
 1 file changed, 1 deletion(-)

diff --git sysdeps/mach/hurd/dl-sysdep.c sysdeps/mach/hurd/dl-sysdep.c
index 2cc342ec8e..5121ce325c 100644
--- sysdeps/mach/hurd/dl-sysdep.c
+++ sysdeps/mach/hurd/dl-sysdep.c
@@ -575,7 +575,6 @@ check_no_hidden(__access_noerrno);
 int weak_function
 __access_noerrno (const char *file, int type)
 {
-  errno = ENOSYS;
   return -1;
 }
 


Grüße
 Thomas

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

* Re: [hurd,commited] hurd: Fix rtld link
  2017-12-15 16:11 ` Thomas Schwinge
@ 2017-12-15 16:48   ` Samuel Thibault
  2017-12-15 17:10     ` Thomas Schwinge
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2017-12-15 16:48 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: libc-alpha

Thomas Schwinge, on ven. 15 déc. 2017 17:11:32 +0100, wrote:
> Hi Samuel!
> 
> On Sun,  3 Sep 2017 04:33:45 +0200, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > --- a/sysdeps/mach/hurd/dl-sysdep.c
> > +++ b/sysdeps/mach/hurd/dl-sysdep.c
> 
> > +int weak_function
> > +__access_noerrno (const char *file, int type)
> > +{
> > +  errno = ENOSYS;
> > +  return -1;
> > +}

D'oh...

> I just stumbled across this -- OK to push the following?  Note that I
> have not tested this.  If approving this, please respond with
> "Reviewed-by: NAME <EMAIL>" so that your effort will be recorded.  See
> <https://gcc.gnu.org/wiki/Reviewed-by>.
> 
> commit 336e16f8e6a588ba048997722a114f9d4462dbdb
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date:   Fri Dec 15 17:00:50 2017 +0100
> 
>     Don't set errno in Hurd rtld's __access_noerrno
>     
>             * sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): Don't set
>             errno.
>     
>     Fixes commit 819ea3347e3a30a611488ceeec53650baaeb7961.


Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Thanks!

> ---
>  sysdeps/mach/hurd/dl-sysdep.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git sysdeps/mach/hurd/dl-sysdep.c sysdeps/mach/hurd/dl-sysdep.c
> index 2cc342ec8e..5121ce325c 100644
> --- sysdeps/mach/hurd/dl-sysdep.c
> +++ sysdeps/mach/hurd/dl-sysdep.c
> @@ -575,7 +575,6 @@ check_no_hidden(__access_noerrno);
>  int weak_function
>  __access_noerrno (const char *file, int type)
>  {
> -  errno = ENOSYS;
>    return -1;
>  }
>  
> 
> 
> Grüße
>  Thomas
> 

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

* Re: [hurd,commited] hurd: Fix rtld link
  2017-12-15 16:48   ` Samuel Thibault
@ 2017-12-15 17:10     ` Thomas Schwinge
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Schwinge @ 2017-12-15 17:10 UTC (permalink / raw)
  To: Samuel Thibault, libc-alpha

Hi!

On Fri, 15 Dec 2017 17:48:42 +0100, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Thomas Schwinge, on ven. 15 déc. 2017 17:11:32 +0100, wrote:
> > On Sun,  3 Sep 2017 04:33:45 +0200, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > > --- a/sysdeps/mach/hurd/dl-sysdep.c
> > > +++ b/sysdeps/mach/hurd/dl-sysdep.c
> > 
> > > +int weak_function
> > > +__access_noerrno (const char *file, int type)
> > > +{
> > > +  errno = ENOSYS;
> > > +  return -1;
> > > +}
> 
> D'oh...

;-)

Pushed:

commit d232f2e137127139addde487f0f01881b52cc446
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Dec 15 17:00:50 2017 +0100

    Don't set errno in Hurd rtld's __access_noerrno
    
            * sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): Don't set
            errno.
    
    Fixes commit 819ea3347e3a30a611488ceeec53650baaeb7961.
    
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 ChangeLog                     | 5 +++++
 sysdeps/mach/hurd/dl-sysdep.c | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git ChangeLog ChangeLog
index 00161628c5..027f948ec9 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2017-12-15  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): Don't set
+	errno.
+
 2017-12-15  Joseph Myers  <joseph@codesourcery.com>
 
 	* scripts/build-many-glibcs.py (Context.add_all_configs): Use
diff --git sysdeps/mach/hurd/dl-sysdep.c sysdeps/mach/hurd/dl-sysdep.c
index 2cc342ec8e..5121ce325c 100644
--- sysdeps/mach/hurd/dl-sysdep.c
+++ sysdeps/mach/hurd/dl-sysdep.c
@@ -575,7 +575,6 @@ check_no_hidden(__access_noerrno);
 int weak_function
 __access_noerrno (const char *file, int type)
 {
-  errno = ENOSYS;
   return -1;
 }
 


Grüße
 Thomas

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

* [hurd,commited] hurd: Fix rtld link
@ 2017-09-03  2:34 Samuel Thibault
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2017-09-03  2:34 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

	* sysdeps/mach/hurd/dl-sysdep.c (__sbrk): New function.
---
 ChangeLog                     |  3 ++-
 sysdeps/mach/hurd/dl-sysdep.c | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2e6083b372..11edadd5fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,7 +18,8 @@
 	Fix <unistd.h> inclusion.
 	* sysdeps/posix/pwritev2.c: Include <errno.h>.
 	* sysdeps/posix/pwritev64v2.c: Include <errno.h>.
-	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): New function.
+	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno, __sbrk): New
+	functions.
 
 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 2bfa64f02a..dec00f35f0 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -591,6 +591,16 @@ __getcwd (char *buf, size_t size)
   return NULL;
 }
 
+/* This is used by dl-tunables.c to strdup strings.  We can just make this a
+   mere allocation.  */
+void *
+__sbrk (intptr_t increment)
+{
+  vm_address_t addr;
+  __vm_allocate (__mach_task_self (), &addr, increment, 1);
+  return (void *) addr;
+}
+
 void weak_function attribute_hidden
 _exit (int status)
 {
-- 
2.14.1

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

end of thread, other threads:[~2017-12-15 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03  2:33 [hurd,commited] hurd: Fix rtld link Samuel Thibault
2017-12-15 16:11 ` Thomas Schwinge
2017-12-15 16:48   ` Samuel Thibault
2017-12-15 17:10     ` Thomas Schwinge
2017-09-03  2:34 Samuel Thibault

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).