@@ -20,6 +20,7 @@
#include <hurd/resource.h>
#include <lock-intern.h> /* For `struct mutex'. */
#include <vm_param.h>
+#include <shlib-compat.h>
/* Initial maximum size of the data segment (this is arbitrary). */
@@ -33,10 +34,12 @@ vm_address_t _hurd_data_end;
Pages beyond the one containing this address allow no access. */
vm_address_t _hurd_brk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* This name is used by the Linux crtbeginS.o for reasons you don't even
want to think about it. It's just easier to provide some definition for
it than even to explain the braindamage involved. */
-weak_alias (_hurd_brk, ___brk_addr)
+compat_symbol (libc, _hurd_brk, ___brk_addr, GLIBC_2_0);
+#endif
struct mutex _hurd_brk_lock;
@@ -19,14 +19,17 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux ELF dynamic
linker. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -24,14 +24,17 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux ELF dynamic
linker. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -19,6 +19,7 @@
<https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <shlib-compat.h>
#include <asm/errno.h>
@@ -30,7 +31,9 @@
__curbrk:
data8 0
-weak_alias (__curbrk, ___brk_addr)
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0)
+#endif
LEAF(__brk)
.regstk 1, 0, 0, 0
@@ -19,13 +19,16 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux/x86 ELF
dynamic linker. Sigh. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -18,14 +18,17 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux ELF dynamic
linker. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -19,13 +19,16 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux/x86 ELF
dynamic linker. Sigh. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -20,13 +20,16 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux/x86 ELF
dynamic linker. Sigh. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)
@@ -20,14 +20,17 @@
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
+#include <shlib-compat.h>
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
to work around different old braindamage in the old Linux ELF dynamic
linker. */
-weak_alias (__curbrk, ___brk_addr)
+compat_symbol (libc, __curbrk, ___brk_addr, GLIBC_2_0);
+#endif
int
__brk (void *addr)