This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

build for sh fails with "fanotify_mark@@VERSION_libc_er"


Hi,

During taking a look at soft-float fma/fmaf issue for sh, I've noticed
an error for sh build with fresh git tree:

...
/usr/local/bin/sh3-unknown-linux-gnu-ld: /exp/ldroot/dodes/xsh-libc-sh3orig/libc.so: version node not found for symbol fanotify_mark@@VERSION_libc_er
/usr/local/bin/sh3-unknown-linux-gnu-ld: failed to set dynamic section sizes: Bad value

An odd symbol fanotify_mark@@VERSION_libc_er came from the line

 versioned_symbol (libc, __fanotify_mark_er, fanotify_mark, er);

of the generated file misc/stub-syscalls.c.  It seems that the line
should be something like:

 versioned_symbol (libc, __fanotify_mark_GLIBC_2_16, fanotify_mark, GLIBC_2_16);

The line is generated by sysdeps/unix/Makefile with:

	 for call in $(unix-stub-syscalls); do \
	   case $$call in \
	   *@@*) \
	     ver=$${call##*@}; call=$${call%%@*}; \
	     ver=`echo "$ver" | sed 's/\./_/g'`; \
	     echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
	     echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\
	     ;; \

For my environment, in the command

	     ver=`echo "$ver" | sed 's/\./_/g'`; \

it looks that echo "$ver" outputs "er" and gets the above odd symbol.
Is this my shell(bash) or make issue?

FYI, the patch below works for me.

diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 2b607a0..e6adb9d 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -52,13 +52,13 @@ $(objpfx)stub-syscalls.c: $(common-objpfx)sysd-syscalls \
           case $$call in \
           *@@*) \
             ver=$${call##*@}; call=$${call%%@*}; \
-            ver=`echo "$ver" | sed 's/\./_/g'`; \
+            ver=`echo "$$ver" | sed 's/\./_/g'`; \
             echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
             echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\
             ;; \
           *@*) \
             ver=$${call##*@}; call=$${call%%@*}; \
-            ver=`echo "$ver" | sed 's/\./_/g'`; \
+            ver=`echo "$$ver" | sed 's/\./_/g'`; \
             echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
             echo "compat_symbol (libc, __$${call}_$${ver}, $$call, $$ver);" \
             ;; \

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]