Bug 248572 - scandir_b is suspiciously absent from libc.so.7
Summary: scandir_b is suspiciously absent from libc.so.7
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Konstantin Belousov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-10 10:25 UTC by Alex S
Modified: 2020-08-19 13:57 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex S 2020-08-10 10:25:14 UTC
% readelf -s /lib/libc.so.7 | grep scandir
  1437: 00000000000ac3f0   504 FUNC    GLOBAL DEFAULT   12 scandir@FBSD_1.0 (2)
  1438: 00000000000b4f10   504 FUNC    GLOBAL DEFAULT   12 scandir@@FBSD_1.5 (7)

% readelf -s /lib/libc.so.7 | grep "_b@"
  1333: 000000000019af70   113 FUNC    GLOBAL DEFAULT   12 atexit_b@@FBSD_1.4 (6)
  1416: 00000000000871c0  3681 FUNC    GLOBAL DEFAULT   12 heapsort_b@@FBSD_1.4 (6)
  1865: 0000000000084ca0  8865 FUNC    GLOBAL DEFAULT   12 mergesort_b@@FBSD_1.4 (6)
  3153: 00000000000c2e80    14 FUNC    GLOBAL DEFAULT   12 qsort_b@@FBSD_1.4 (6)
Comment 1 Konstantin Belousov freebsd_committer freebsd_triage 2020-08-10 11:34:11 UTC
I am curious, did you noted this trying to use blocks, or just noticed some inconsistency while looking at the export list for libc ?
Comment 2 Alex S 2020-08-10 12:23:51 UTC
(In reply to Konstantin Belousov from comment #1)

> did you noted this trying to use blocks

Something like that.
Comment 3 Konstantin Belousov freebsd_committer freebsd_triage 2020-08-10 17:15:19 UTC
https://reviews.freebsd.org/D26020
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-08-10 21:42:32 UTC
A commit references this bug:

Author: kib
Date: Mon Aug 10 21:41:50 UTC 2020
New revision: 364091
URL: https://svnweb.freebsd.org/changeset/base/364091

Log:
  Export scandir_b from libc.

  Apparently it was not exported, because scandir_b.c was not included
  into libc SRCS.  Export it with the CURRENT-13 version.

  Also, because it was not exported before ino64, clean up
  scandir-compat11.c.

  PR:	248572
  Reported by:	Alex S <iwtcex@gmail.com>
  Reviewed by:	emaste
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D26020

Changes:
  head/lib/libc/gen/Makefile.inc
  head/lib/libc/gen/Symbol.map
  head/lib/libc/gen/scandir-compat11.c
  head/lib/libc/gen/scandir.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-08-17 16:27:29 UTC
A commit references this bug:

Author: kib
Date: Mon Aug 17 16:27:03 UTC 2020
New revision: 364311
URL: https://svnweb.freebsd.org/changeset/base/364311

Log:
  MFC r364091:
  Export scandir_b from libc.

  PR:	248572

Changes:
_U  stable/12/
  stable/12/lib/libc/gen/Makefile.inc
  stable/12/lib/libc/gen/Symbol.map
  stable/12/lib/libc/gen/scandir-compat11.c
  stable/12/lib/libc/gen/scandir.c