libc: fix _dummy_signal_syscalls name in signalr.c

Message ID 20260119171205.84858-1-andrew@andrewoates.com
State New
Headers
Series libc: fix _dummy_signal_syscalls name in signalr.c |

Commit Message

Andrew Oates Jan. 19, 2026, 5:11 p.m. UTC
  From: Andrew Oates <andrew@andrewoates.com>

I don't understand the purpose of these dummy variables, but they date
back to 2000 and the import of the 2000-02-17 snapshot.
_dummy_link_syscalls is defined in two places, here and linkr.c.  This
updates the symbol name to match the file, so we don't define the same
symbol in two places.
---
 newlib/libc/reent/signalr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Corinna Vinschen Jan. 20, 2026, 9:47 a.m. UTC | #1
On Jan 19 12:11, andrew@andrewoates.com wrote:
> From: Andrew Oates <andrew@andrewoates.com>
> 
> I don't understand the purpose of these dummy variables, but they date
> back to 2000 and the import of the 2000-02-17 snapshot.

Me neither.  I defer to Jeff here.


Corinna

> _dummy_link_syscalls is defined in two places, here and linkr.c.  This
> updates the symbol name to match the file, so we don't define the same
> symbol in two places.
> ---
>  newlib/libc/reent/signalr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/reent/signalr.c b/newlib/libc/reent/signalr.c
> index 863ae7400..e4945102f 100644
> --- a/newlib/libc/reent/signalr.c
> +++ b/newlib/libc/reent/signalr.c
> @@ -17,7 +17,7 @@
>  
>  #ifdef REENTRANT_SYSCALLS_PROVIDED
>  
> -int _dummy_link_syscalls = 1;
> +int _dummy_signal_syscalls = 1;
>  
>  #else
>  
> -- 
> 2.52.0
  
Jeff Johnston Jan. 20, 2026, 4:55 p.m. UTC | #2
IIRC, the dummy variables were to prevent the object files from being empty
and causing issues with one of the build tools we were using (likely
libtool).

-- Jeff J.

On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jan 19 12:11, andrew@andrewoates.com wrote:
> > From: Andrew Oates <andrew@andrewoates.com>
> >
> > I don't understand the purpose of these dummy variables, but they date
> > back to 2000 and the import of the 2000-02-17 snapshot.
>
> Me neither.  I defer to Jeff here.
>
>
> Corinna
>
> > _dummy_link_syscalls is defined in two places, here and linkr.c.  This
> > updates the symbol name to match the file, so we don't define the same
> > symbol in two places.
> > ---
> >  newlib/libc/reent/signalr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/newlib/libc/reent/signalr.c b/newlib/libc/reent/signalr.c
> > index 863ae7400..e4945102f 100644
> > --- a/newlib/libc/reent/signalr.c
> > +++ b/newlib/libc/reent/signalr.c
> > @@ -17,7 +17,7 @@
> >
> >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> >
> > -int _dummy_link_syscalls = 1;
> > +int _dummy_signal_syscalls = 1;
> >
> >  #else
> >
> > --
> > 2.52.0
>
>
  
Corinna Vinschen Jan. 20, 2026, 6:42 p.m. UTC | #3
On Jan 20 11:55, Jeff Johnston wrote:
> IIRC, the dummy variables were to prevent the object files from being empty
> and causing issues with one of the build tools we were using (likely
> libtool).

Meaning, we don't need them anymore?


Corinna


> 
> -- Jeff J.
> 
> On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <vinschen@redhat.com>
> wrote:
> 
> > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > From: Andrew Oates <andrew@andrewoates.com>
> > >
> > > I don't understand the purpose of these dummy variables, but they date
> > > back to 2000 and the import of the 2000-02-17 snapshot.
> >
> > Me neither.  I defer to Jeff here.
> >
> >
> > Corinna
> >
> > > _dummy_link_syscalls is defined in two places, here and linkr.c.  This
> > > updates the symbol name to match the file, so we don't define the same
> > > symbol in two places.
> > > ---
> > >  newlib/libc/reent/signalr.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/newlib/libc/reent/signalr.c b/newlib/libc/reent/signalr.c
> > > index 863ae7400..e4945102f 100644
> > > --- a/newlib/libc/reent/signalr.c
> > > +++ b/newlib/libc/reent/signalr.c
> > > @@ -17,7 +17,7 @@
> > >
> > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > >
> > > -int _dummy_link_syscalls = 1;
> > > +int _dummy_signal_syscalls = 1;
> > >
> > >  #else
> > >
> > > --
> > > 2.52.0
> >
> >
  
Jeff Johnston Jan. 20, 2026, 8:48 p.m. UTC | #4
Likely, but I would rather this be tested first on multiple platforms.

-- Jeff J.

On Tue, Jan 20, 2026 at 1:43 PM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jan 20 11:55, Jeff Johnston wrote:
> > IIRC, the dummy variables were to prevent the object files from being
> empty
> > and causing issues with one of the build tools we were using (likely
> > libtool).
>
> Meaning, we don't need them anymore?
>
>
> Corinna
>
>
> >
> > -- Jeff J.
> >
> > On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <vinschen@redhat.com>
> > wrote:
> >
> > > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > > From: Andrew Oates <andrew@andrewoates.com>
> > > >
> > > > I don't understand the purpose of these dummy variables, but they
> date
> > > > back to 2000 and the import of the 2000-02-17 snapshot.
> > >
> > > Me neither.  I defer to Jeff here.
> > >
> > >
> > > Corinna
> > >
> > > > _dummy_link_syscalls is defined in two places, here and linkr.c.
> This
> > > > updates the symbol name to match the file, so we don't define the
> same
> > > > symbol in two places.
> > > > ---
> > > >  newlib/libc/reent/signalr.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/newlib/libc/reent/signalr.c
> b/newlib/libc/reent/signalr.c
> > > > index 863ae7400..e4945102f 100644
> > > > --- a/newlib/libc/reent/signalr.c
> > > > +++ b/newlib/libc/reent/signalr.c
> > > > @@ -17,7 +17,7 @@
> > > >
> > > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > > >
> > > > -int _dummy_link_syscalls = 1;
> > > > +int _dummy_signal_syscalls = 1;
> > > >
> > > >  #else
> > > >
> > > > --
> > > > 2.52.0
> > >
> > >
>
>
  
Corinna Vinschen Jan. 21, 2026, 9:20 a.m. UTC | #5
On Jan 20 15:48, Jeff Johnston wrote:
> Likely, but I would rather this be tested first on multiple platforms.

Alternatively we just use Andrew's patch.  It's the safe way forward,
I guess.


Corinna


> 
> -- Jeff J.
> 
> On Tue, Jan 20, 2026 at 1:43 PM Corinna Vinschen <vinschen@redhat.com>
> wrote:
> 
> > On Jan 20 11:55, Jeff Johnston wrote:
> > > IIRC, the dummy variables were to prevent the object files from being
> > empty
> > > and causing issues with one of the build tools we were using (likely
> > > libtool).
> >
> > Meaning, we don't need them anymore?
> >
> >
> > Corinna
> >
> >
> > >
> > > -- Jeff J.
> > >
> > > On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <vinschen@redhat.com>
> > > wrote:
> > >
> > > > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > > > From: Andrew Oates <andrew@andrewoates.com>
> > > > >
> > > > > I don't understand the purpose of these dummy variables, but they
> > date
> > > > > back to 2000 and the import of the 2000-02-17 snapshot.
> > > >
> > > > Me neither.  I defer to Jeff here.
> > > >
> > > >
> > > > Corinna
> > > >
> > > > > _dummy_link_syscalls is defined in two places, here and linkr.c.
> > This
> > > > > updates the symbol name to match the file, so we don't define the
> > same
> > > > > symbol in two places.
> > > > > ---
> > > > >  newlib/libc/reent/signalr.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/newlib/libc/reent/signalr.c
> > b/newlib/libc/reent/signalr.c
> > > > > index 863ae7400..e4945102f 100644
> > > > > --- a/newlib/libc/reent/signalr.c
> > > > > +++ b/newlib/libc/reent/signalr.c
> > > > > @@ -17,7 +17,7 @@
> > > > >
> > > > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > > > >
> > > > > -int _dummy_link_syscalls = 1;
> > > > > +int _dummy_signal_syscalls = 1;
> > > > >
> > > > >  #else
> > > > >
> > > > > --
> > > > > 2.52.0
> > > >
> > > >
> >
> >
  
Jeff Johnston Jan. 21, 2026, 5:40 p.m. UTC | #6
Agreed.  I have modified the patch to also change the fstat64 name to be
unique and pushed to main.

-- Jeff J.

On Wed, Jan 21, 2026 at 4:21 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jan 20 15:48, Jeff Johnston wrote:
> > Likely, but I would rather this be tested first on multiple platforms.
>
> Alternatively we just use Andrew's patch.  It's the safe way forward,
> I guess.
>
>
> Corinna
>
>
> >
> > -- Jeff J.
> >
> > On Tue, Jan 20, 2026 at 1:43 PM Corinna Vinschen <vinschen@redhat.com>
> > wrote:
> >
> > > On Jan 20 11:55, Jeff Johnston wrote:
> > > > IIRC, the dummy variables were to prevent the object files from being
> > > empty
> > > > and causing issues with one of the build tools we were using (likely
> > > > libtool).
> > >
> > > Meaning, we don't need them anymore?
> > >
> > >
> > > Corinna
> > >
> > >
> > > >
> > > > -- Jeff J.
> > > >
> > > > On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <
> vinschen@redhat.com>
> > > > wrote:
> > > >
> > > > > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > > > > From: Andrew Oates <andrew@andrewoates.com>
> > > > > >
> > > > > > I don't understand the purpose of these dummy variables, but they
> > > date
> > > > > > back to 2000 and the import of the 2000-02-17 snapshot.
> > > > >
> > > > > Me neither.  I defer to Jeff here.
> > > > >
> > > > >
> > > > > Corinna
> > > > >
> > > > > > _dummy_link_syscalls is defined in two places, here and linkr.c.
> > > This
> > > > > > updates the symbol name to match the file, so we don't define the
> > > same
> > > > > > symbol in two places.
> > > > > > ---
> > > > > >  newlib/libc/reent/signalr.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/newlib/libc/reent/signalr.c
> > > b/newlib/libc/reent/signalr.c
> > > > > > index 863ae7400..e4945102f 100644
> > > > > > --- a/newlib/libc/reent/signalr.c
> > > > > > +++ b/newlib/libc/reent/signalr.c
> > > > > > @@ -17,7 +17,7 @@
> > > > > >
> > > > > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > > > > >
> > > > > > -int _dummy_link_syscalls = 1;
> > > > > > +int _dummy_signal_syscalls = 1;
> > > > > >
> > > > > >  #else
> > > > > >
> > > > > > --
> > > > > > 2.52.0
> > > > >
> > > > >
> > >
> > >
>
>
  
Corinna Vinschen Jan. 21, 2026, 6:20 p.m. UTC | #7
On Jan 21 12:40, Jeff Johnston wrote:
> Agreed.  I have modified the patch to also change the fstat64 name to be
> unique and pushed to main.

Great!  For the newlib snapshot, let's wait a bit for a reply to the
patch from https://sourceware.org/pipermail/newlib/2026/022236.html


Corinna

> 
> -- Jeff J.
> 
> On Wed, Jan 21, 2026 at 4:21 AM Corinna Vinschen <vinschen@redhat.com>
> wrote:
> 
> > On Jan 20 15:48, Jeff Johnston wrote:
> > > Likely, but I would rather this be tested first on multiple platforms.
> >
> > Alternatively we just use Andrew's patch.  It's the safe way forward,
> > I guess.
> >
> >
> > Corinna
> >
> >
> > >
> > > -- Jeff J.
> > >
> > > On Tue, Jan 20, 2026 at 1:43 PM Corinna Vinschen <vinschen@redhat.com>
> > > wrote:
> > >
> > > > On Jan 20 11:55, Jeff Johnston wrote:
> > > > > IIRC, the dummy variables were to prevent the object files from being
> > > > empty
> > > > > and causing issues with one of the build tools we were using (likely
> > > > > libtool).
> > > >
> > > > Meaning, we don't need them anymore?
> > > >
> > > >
> > > > Corinna
> > > >
> > > >
> > > > >
> > > > > -- Jeff J.
> > > > >
> > > > > On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <
> > vinschen@redhat.com>
> > > > > wrote:
> > > > >
> > > > > > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > > > > > From: Andrew Oates <andrew@andrewoates.com>
> > > > > > >
> > > > > > > I don't understand the purpose of these dummy variables, but they
> > > > date
> > > > > > > back to 2000 and the import of the 2000-02-17 snapshot.
> > > > > >
> > > > > > Me neither.  I defer to Jeff here.
> > > > > >
> > > > > >
> > > > > > Corinna
> > > > > >
> > > > > > > _dummy_link_syscalls is defined in two places, here and linkr.c.
> > > > This
> > > > > > > updates the symbol name to match the file, so we don't define the
> > > > same
> > > > > > > symbol in two places.
> > > > > > > ---
> > > > > > >  newlib/libc/reent/signalr.c | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/newlib/libc/reent/signalr.c
> > > > b/newlib/libc/reent/signalr.c
> > > > > > > index 863ae7400..e4945102f 100644
> > > > > > > --- a/newlib/libc/reent/signalr.c
> > > > > > > +++ b/newlib/libc/reent/signalr.c
> > > > > > > @@ -17,7 +17,7 @@
> > > > > > >
> > > > > > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > > > > > >
> > > > > > > -int _dummy_link_syscalls = 1;
> > > > > > > +int _dummy_signal_syscalls = 1;
> > > > > > >
> > > > > > >  #else
> > > > > > >
> > > > > > > --
> > > > > > > 2.52.0
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >
  
Jeff Johnston Jan. 21, 2026, 9:19 p.m. UTC | #8
Ok.



On Wed, Jan 21, 2026 at 1:21 PM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jan 21 12:40, Jeff Johnston wrote:
> > Agreed.  I have modified the patch to also change the fstat64 name to be
> > unique and pushed to main.
>
> Great!  For the newlib snapshot, let's wait a bit for a reply to the
> patch from https://sourceware.org/pipermail/newlib/2026/022236.html
>
>
> Corinna
>
> >
> > -- Jeff J.
> >
> > On Wed, Jan 21, 2026 at 4:21 AM Corinna Vinschen <vinschen@redhat.com>
> > wrote:
> >
> > > On Jan 20 15:48, Jeff Johnston wrote:
> > > > Likely, but I would rather this be tested first on multiple
> platforms.
> > >
> > > Alternatively we just use Andrew's patch.  It's the safe way forward,
> > > I guess.
> > >
> > >
> > > Corinna
> > >
> > >
> > > >
> > > > -- Jeff J.
> > > >
> > > > On Tue, Jan 20, 2026 at 1:43 PM Corinna Vinschen <
> vinschen@redhat.com>
> > > > wrote:
> > > >
> > > > > On Jan 20 11:55, Jeff Johnston wrote:
> > > > > > IIRC, the dummy variables were to prevent the object files from
> being
> > > > > empty
> > > > > > and causing issues with one of the build tools we were using
> (likely
> > > > > > libtool).
> > > > >
> > > > > Meaning, we don't need them anymore?
> > > > >
> > > > >
> > > > > Corinna
> > > > >
> > > > >
> > > > > >
> > > > > > -- Jeff J.
> > > > > >
> > > > > > On Tue, Jan 20, 2026 at 4:47 AM Corinna Vinschen <
> > > vinschen@redhat.com>
> > > > > > wrote:
> > > > > >
> > > > > > > On Jan 19 12:11, andrew@andrewoates.com wrote:
> > > > > > > > From: Andrew Oates <andrew@andrewoates.com>
> > > > > > > >
> > > > > > > > I don't understand the purpose of these dummy variables, but
> they
> > > > > date
> > > > > > > > back to 2000 and the import of the 2000-02-17 snapshot.
> > > > > > >
> > > > > > > Me neither.  I defer to Jeff here.
> > > > > > >
> > > > > > >
> > > > > > > Corinna
> > > > > > >
> > > > > > > > _dummy_link_syscalls is defined in two places, here and
> linkr.c.
> > > > > This
> > > > > > > > updates the symbol name to match the file, so we don't
> define the
> > > > > same
> > > > > > > > symbol in two places.
> > > > > > > > ---
> > > > > > > >  newlib/libc/reent/signalr.c | 2 +-
> > > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > >
> > > > > > > > diff --git a/newlib/libc/reent/signalr.c
> > > > > b/newlib/libc/reent/signalr.c
> > > > > > > > index 863ae7400..e4945102f 100644
> > > > > > > > --- a/newlib/libc/reent/signalr.c
> > > > > > > > +++ b/newlib/libc/reent/signalr.c
> > > > > > > > @@ -17,7 +17,7 @@
> > > > > > > >
> > > > > > > >  #ifdef REENTRANT_SYSCALLS_PROVIDED
> > > > > > > >
> > > > > > > > -int _dummy_link_syscalls = 1;
> > > > > > > > +int _dummy_signal_syscalls = 1;
> > > > > > > >
> > > > > > > >  #else
> > > > > > > >
> > > > > > > > --
> > > > > > > > 2.52.0
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > >
> > >
>
>
  

Patch

diff --git a/newlib/libc/reent/signalr.c b/newlib/libc/reent/signalr.c
index 863ae7400..e4945102f 100644
--- a/newlib/libc/reent/signalr.c
+++ b/newlib/libc/reent/signalr.c
@@ -17,7 +17,7 @@ 
 
 #ifdef REENTRANT_SYSCALLS_PROVIDED
 
-int _dummy_link_syscalls = 1;
+int _dummy_signal_syscalls = 1;
 
 #else