Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
R
relibc
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • redox-os
  • relibc
  • Merge Requests
  • !262

The source project of this merge request has been removed.
Merged
Opened Apr 07, 2020 by Ahmed Abd El Mawgood@oddcoderContributor

Use Kernel mapped binaries when available.

  • Overview 0
  • Changes 3

At least in linux kernel, assuming that a.out is an elf that is linked against relibc's own ld.so. When a user attempts ./a.out, Linux kernel will map ./a.out, then map ld.so and jump into ld.so entry point. In relibc ld.so will simply ignore the kernel mapped a.out and create its own mapping. This patch forces relic ld.so to use the already mapped a.out when ever possible. This would normally have slight performance improvement (especially that currently relibc doesn't map a.out but instead copy the data into empty mmaped memory).

The real motivation behind this patch is while impelemnting Runtime linker debugging protocol for relibc. part of the protocol is ld.so inseting address of some ld.so managed data structure into .dynamic seciton of a.out then the debugger would check it there. The thing is that debuggers have information about the kernel loaded ./a.out and they check that one specifically which is in our case totally ignored by relibc.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: redox-os/relibc!262
Source branch: use_kernel_loaded_elf

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.