https://bugs.freedesktop.org/show_bug.cgi?id=108541

            Bug ID: 108541
           Summary: Convert x86 assembly stub to PIC to fix linking with
                    lld
           Product: Mesa
           Version: unspecified
          Hardware: Other
                OS: OpenBSD
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: na...@mips.inka.de
        QA Contact: mesa-dev@lists.freedesktop.org

Created attachment 142177
  --> https://bugs.freedesktop.org/attachment.cgi?id=142177&action=edit
Convert entry_x86_tsd.h to PIC

The x86 assembly language stub in src/mapi/entry_x86_tsd.h does not generate
PIC (position-independent code). This causes text relocations, which are by
default treated as an error by LLVM's lld linker (now used by FreeBSD and
OpenBSD) when building a shared library.

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol:
_glapi_Dispatch in readonly segment; recompile object files with -fPIC
>>> defined in .libs/shared_glapi_libglapi_la-u_current.o
>>> referenced by entry.c
>>>               .libs/shared_glapi_libglapi_la-entry.o:(.text+0x1)

The accompanying minimal diff remedies this by generating PIC code.  This is
mostly copied from the neighboring entry_x86_tls.h.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to