Skip to content

RFC: verify Linx qemu-user dynamic glibc printf path#129

Open
touzicongbupianren wants to merge 7 commits into
LinxISA:mainfrom
touzicongbupianren:lihan-glibc-printf-pr
Open

RFC: verify Linx qemu-user dynamic glibc printf path#129
touzicongbupianren wants to merge 7 commits into
LinxISA:mainfrom
touzicongbupianren:lihan-glibc-printf-pr

Conversation

@touzicongbupianren

@touzicongbupianren touzicongbupianren commented Jun 3, 2026

Copy link
Copy Markdown

This branch demonstrates a working Linx qemu-user dynamic glibc printf path.

Validated:

  • Linx dynamic ELF links successfully.
  • ELF interpreter: /lib/ld.so.1
  • NEEDED: libc.so.6
  • qemu-linx runs printf successfully.
  • stdout is clean:
    Hello from Linx glibc printf: value=42 status=ok
  • stderr is empty.
  • glibc G1b build passes.
  • tools/ci/check_repo_layout.sh passes.

Related branches:

  • LLVM: lihan-lld-hi-lo-fix
  • QEMU: lihan-qemu-user-glibc-pr
  • glibc: lihan-glibc-user-bringup-pr

Note:
This PR depends on the related LLVM/QEMU/glibc submodule PRs being accepted first.
After those are merged into LinxISA/*, this PR can be refreshed as a normal submodule bump.
LinxISA/llvm-project@main...touzicongbupianren:llvm-project:lihan-lld-hi-lo-fix
LinxISA/qemu@qemu-my-patch-v7.0.0...touzicongbupianren:qemu:lihan-qemu-user-glibc-pr
LinxISA/glibc@master...touzicongbupianren:glibc:lihan-glibc-user-bringup-pr

cc @zhoubot @LinxISA/maintainers

@touzicongbupianren

Copy link
Copy Markdown
Author

This is an RFC/demo PR for a working Linx qemu-user dynamic glibc printf path.

Validated:

  • Linx dynamic ELF links successfully.
  • ELF interpreter: /lib/ld.so.1
  • NEEDED: libc.so.6
  • qemu-linx runs printf successfully.
  • stdout is clean:
    Hello from Linx glibc printf: value=42 status=ok
  • stderr is empty.
  • glibc G1b build passes.
  • tools/ci/check_repo_layout.sh passes.

Related PR branches:

  • LLVM: lihan-lld-hi-lo-fix
  • QEMU: lihan-qemu-user-glibc-pr
  • glibc: lihan-glibc-user-bringup-pr

Note:
This PR uses forked submodule URLs for reproducibility. Once the submodule PRs are accepted upstream, this can be respun as a normal submodule bump against LinxISA/*.

cc @zhoubot @LinxISA/maintainers

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates submodule references and adds several test cases for Linx glibc and QEMU user-mode emulation. The feedback highlights critical issues: changing submodule URLs to personal SSH-based forks in .gitmodules will break cloning for other developers and CI/CD pipelines; the inline assembly in lihan_qemu_user_hello.c contains compiler hazards and undefined behavior that should be resolved using local register variables; and the test script lihan_cat_glibc_autolink.sh should use a unique temporary directory instead of a hardcoded path in /tmp to prevent conflicts.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .gitmodules Outdated
Comment thread .gitmodules Outdated
Comment thread .gitmodules Outdated
Comment thread avs/qemu/tests/lihan_qemu_user_hello.c Outdated
Comment thread avs/qemu/tests/lihan_cat_glibc_autolink.sh Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant