A curious case of fmemopen@GLIBC_2.2.5 on aarch64
Florian Weimer
fweimer@redhat.com
Wed Jul 23 16:28:27 GMT 2025
* Dimitri John Ledkov:
> Binaires compiled on rhel7 aarch64 appear to not be portable to
> non-rhel aarch64 OSes - see example at
> https://github.com/elastic/go-quark/issues/33
The bug is in the Cgo part of quark.go:
/*
#cgo CFLAGS: -I${SRCDIR}/include
#cgo amd64 LDFLAGS: -Wl,--wrap=fmemopen ${SRCDIR}/libquark_big_amd64.a
#cgo arm64 LDFLAGS: -Wl,--wrap=fmemopen ${SRCDIR}/libquark_big_arm64.a
#include <stdlib.h>
#include "quark.h"
__asm__(".symver fmemopen, fmemopen@GLIBC_2.2.5");
FILE *
__wrap_fmemopen(void *buf, size_t size, const char *mode)
{
return fmemopen(buf, size, mode);
}
*/
That code is not portable because that GLBIC_2.2.5 symbol version is
architecture-specific.
Thanks,
Florian
More information about the Libc-alpha
mailing list