[newlib-cygwin/main] Revert last changes to fini.c and init.c

Jeff Johnston jjohnstn@sourceware.org
Wed Aug 12 17:36:07 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=656465de6be5971cfe8c2c2db705cea73da44a1d

commit 656465de6be5971cfe8c2c2db705cea73da44a1d
Author: Jeff Johnston <jjohnstn@redhat.com>
Date:   Wed Aug 12 13:35:21 2026 -0400

    Revert last changes to fini.c and init.c

Diff:
---
 newlib/libc/misc/fini.c |  6 ++----
 newlib/libc/misc/init.c | 12 ++++--------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/newlib/libc/misc/fini.c b/newlib/libc/misc/fini.c
index 0c3a1e0d5..5f2016070 100644
--- a/newlib/libc/misc/fini.c
+++ b/newlib/libc/misc/fini.c
@@ -14,10 +14,8 @@
 #include <sys/types.h>
 
 #ifdef _HAVE_INITFINI_ARRAY
-extern void (*__fini_array_start []) (void) asm("__fini_array_start")
-	__attribute__((weak));
-extern void (*__fini_array_end []) (void) asm("__fini_array_end")
-	__attribute__((weak));
+extern void (*__fini_array_start []) (void) __attribute__((weak));
+extern void (*__fini_array_end []) (void) __attribute__((weak));
 
 #ifdef _HAVE_INIT_FINI
 extern void _fini (void);
diff --git a/newlib/libc/misc/init.c b/newlib/libc/misc/init.c
index 5781535f9..3aef7ad06 100644
--- a/newlib/libc/misc/init.c
+++ b/newlib/libc/misc/init.c
@@ -16,14 +16,10 @@
 #ifdef _HAVE_INITFINI_ARRAY
 
 /* These magic symbols are provided by the linker.  */
-extern void (*__preinit_array_start []) (void) asm("__preinit_array_start")
-	__attribute__((weak));
-extern void (*__preinit_array_end []) (void) asm("__preinit_array_end")
-	__attribute__((weak));
-extern void (*__init_array_start []) (void) asm("__init_array_start")
-	__attribute__((weak));
-extern void (*__init_array_end []) (void) asm("__init_array_end")
-	__attribute__((weak));
+extern void (*__preinit_array_start []) (void) __attribute__((weak));
+extern void (*__preinit_array_end []) (void) __attribute__((weak));
+extern void (*__init_array_start []) (void) __attribute__((weak));
+extern void (*__init_array_end []) (void) __attribute__((weak));
 
 #ifdef _HAVE_INIT_FINI
 extern void _init (void);


More information about the Newlib-cvs mailing list