Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • L libglvnd
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • glvnd
  • libglvnd
  • Issues
  • #232
Closed
Open
Issue created May 31, 2022 by Robert Clausecker@fuzxxl

libglvnd is compiled for ARM mode, but asm stubs expect thumb mode

This was noted when investigating a build failure of a port dependent on the graphics/libglvnd port of the FreeBSD ports collection. An upstream bug report can be found in PR #263845.

When building for AArch32, the build scripts of libglvnd do not supply any options to select thumb mode code generation. So by default, ARM mode code is generated. Yet the assembly snippets assume Thumb mode and tag their entry symbols as being for Thumb mode (see src/GLdispatch/vnd-glapi/entry_armv7_tsd.c).

As a result, the entry stubs are compiled as ARM code but executed as Thumb code, leading to unpredictable results (usually a crash).

Possible fixes are to either only supply .thumb_func if the code is actually compiled for thumb mode or alternatively to supply compiler options such that the code is indeed compiled for thumb mode. Note that the latter solution means that the code will no longer compile for any targets preceeding Thumb2 support, which might not be desired.

Assignee
Assign to
Time tracking