Bug 246430 - uname -b doesn't work on powerpc64
Summary: uname -b doesn't work on powerpc64
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-ppc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 03:52 UTC by Brad Ackerman
Modified: 2020-07-11 20:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Ackerman 2020-05-13 03:52:17 UTC
Replicable in r360723 powerpc64 snapshot as distributed.

# uname -b
uname: sysctlbyname: No such file or directory


Expected results: definitely not that.

The kern.build_id sysctl returns an empty string and doesn't show up in sysctl -a output.
Comment 1 Mark Johnston freebsd_committer 2020-05-31 18:01:17 UTC
This seems unexpected since powerpc64 now uses lld by default, so bsd.linker.mk should enable the build-id feature.
Comment 2 Brandon Bergren freebsd_committer 2020-06-01 19:27:51 UTC
This is a bug in the linker script. Looking into it.
Comment 3 commit-hook freebsd_committer 2020-06-01 19:41:28 UTC
A commit references this bug:

Author: bdragon
Date: Mon Jun  1 19:40:59 UTC 2020
New revision: 361703
URL: https://svnweb.freebsd.org/changeset/base/361703

Log:
  [PowerPC] Fix build-id note on powerpc64 kernel

  Due to the ordering of the powerpc64 linker script, we were discarding
  all notes before emitting .note.gnu.build-id. This had the effect of
  generating an empty build id section and breaking the kern.build_id
  sysctl added in r348611.

  powerpc and powerpcspe are uneffected.

  PR:		246430
  MFC after:	3 days
  Sponsored by:	Tag1 Consulting, Inc.

Changes:
  head/sys/conf/ldscript.powerpc64
Comment 4 Mark Johnston freebsd_committer 2020-07-11 20:03:51 UTC
Brandon, do you have any plans to MFC the change?  If not we can close this PR.
Comment 5 Brandon Bergren freebsd_committer 2020-07-11 20:38:55 UTC
I'm still planning on MFCing, but I don't have a workflow set up to test MFCs yet, and I still don't *quite* understand the documentation for MFCing stuff, so I've been kinda procastinating on it, somewhat in the hopes that the git switchover would happen in the meantime.

I guess I should just go ahead and set things up on my end.