This is the mail archive of the glibc-bugs@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]

[Bug math/19590] New: Building shared objects that use libmvec.so functions.


https://sourceware.org/bugzilla/show_bug.cgi?id=19590

            Bug ID: 19590
           Summary: Building shared objects that use libmvec.so functions.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: carlos at redhat dot com
  Target Milestone: ---

With GCC6 you can build shared objects which are optimized to call libmvec.so
functions. When such calls go through the _finite aliases the linker is unable
to assemble the final user shared object because the calls contain non-PIC
relocs against shared object symbols.

Is this a sufficient fix?
diff --git a/sysdeps/x86_64/fpu/svml_finite_alias.S
b/sysdeps/x86_64/fpu/svml_finite_alias.S
index 0062fe4..61725b7 100644
--- a/sysdeps/x86_64/fpu/svml_finite_alias.S
+++ b/sysdeps/x86_64/fpu/svml_finite_alias.S
@@ -23,7 +23,7 @@

 #define ALIAS_IMPL(alias, target) \
 ENTRY (alias); \
-       call target; \
+       jmp target@plt; \
        ret; \
 END (alias)

It builds and passes regression testing on my system.

The build failures being seen are:
/usr/bin/ld: /usr/lib64/libmvec_nonshared.a(svml_finite_alias.oS):
relocation R_X86_64_PC32 against undefined symbol `_ZGVbN2v_log@@GLIBC_2.22'
can not be used when making a shared object; recompile with -fPIC

I haven't assembled a reproducer for this yet, but you just need a shared
object which calls an alias defined in libcmvec_nonshared.a.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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