Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S syscall-intercept
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 2
    • Merge requests 2
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • steamsteam
  • syscall-intercept
  • Merge requests
  • !7

Cut down fallback getauxval() reimplementation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon McVittie requested to merge wip/t8843 into steamrt/scout Feb 04, 2019
  • Overview 2
  • Commits 1
  • Changes 2

My fallback implementation of getauxval() didn't special-case AT_HWCAP and AT_HWCAP2 like glibc does. However, we don't actually need it to, because in practice we only called it with argument AT_SYSINFO_EHDR.

Also add correct errno handling, and check for a NULL return at the call site.


@krisman: would you be OK with doing this instead of trying to replicate glibc's special cases?

I'm a little concerned that if we try to implement getauxval() fully, we'll end up being a derivative work of glibc (⇒ relicensing from BSD-3-clause to LGPL-2.1+), and will need to know the finer details of how the ELF loader ld.so works.

Not tested on real systems, but syscall-intercept and libcasefold pass their build-time tests.

Edited Feb 04, 2019 by Simon McVittie
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/t8843