Project

General

Profile

Actions

Bug #13785

closed

loader: move libcrypto to libstand

Added by Toomas Soome about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

No functional changes; move current loader libcrypto sources and build into libstand. This is needed because future crypto implementation bits need to access libstand, but .a archives are limited in cross linking. This is also the reason why zfs reader code is in libstand.

While there, move crypto bits from libstand/zfs into libstand/crypto.

Testing done: build/install/boot

wsdiff. I did run wsdiff to compare master and 13785; the expected changes are linked binaries (symbol address changes), .make.state files, softcore.c (generated file with timestamp) and Makefiles.

wsdiff -vr report.txt boot /tmp/boot

New objects found: 
sys/boot/libcrypto/Makefile
sys/boot/libcrypto/Makefile.com
sys/boot/libcrypto/digest.c
sys/boot/libcrypto/libcrypto.h
sys/boot/libcrypto/amd64/Makefile
sys/boot/libcrypto/amd64/digest.o
sys/boot/libcrypto/amd64/libcrypto.a
sys/boot/libcrypto/amd64/sha1-x86_64.o
sys/boot/libcrypto/amd64/sha1-x86_64.s
sys/boot/libcrypto/amd64/sha1.o
sys/boot/libcrypto/i386/Makefile
sys/boot/libcrypto/i386/digest.o
sys/boot/libcrypto/i386/libcrypto.a
sys/boot/libcrypto/i386/sha1.o

Objects removed: 
lib/libstand/crypto/Makefile.inc
lib/libstand/crypto/digest.c
lib/libstand/crypto/libcrypto.h
sys/boot/libstand/amd64/sha1-x86_64.s

Changed objects: 
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/i386/loader32.efi
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/i386/loader.bin
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/i386/loader.sym
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/i386/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/amd64/loader64.efi
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/amd64/loader.bin
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/amd64/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/amd64/loader.sym
/code/illumos-gate/usr/src/boot/sys/boot/efi/loader/Makefile.com
/code/illumos-gate/usr/src/boot/sys/boot/efi/libefi/amd64/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/efi/libefi/i386/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/libstand/i386/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/libstand/i386/libstand.a
/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64/Makefile
/code/illumos-gate/usr/src/boot/sys/boot/libstand/Makefile.com
/code/illumos-gate/usr/src/boot/sys/boot/libcrypto/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/i386/pxeldr/loader
/code/illumos-gate/usr/src/boot/sys/boot/i386/pxeldr/pxeboot
/code/illumos-gate/usr/src/boot/sys/boot/i386/libi386/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/i386/gptzfsboot/gptzfsboot.bin
/code/illumos-gate/usr/src/boot/sys/boot/i386/gptzfsboot/gptzfsboot
/code/illumos-gate/usr/src/boot/sys/boot/i386/gptzfsboot/gptzfsboot.out
/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64/libstand.a
/code/illumos-gate/usr/src/boot/sys/boot/i386/loader/loader.bin
/code/illumos-gate/usr/src/boot/sys/boot/i386/loader/loader
/code/illumos-gate/usr/src/boot/sys/boot/i386/loader/Makefile
/code/illumos-gate/usr/src/boot/sys/boot/i386/loader/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/libficl/softcore/softcore.c
/code/illumos-gate/usr/src/boot/sys/boot/i386/loader/loader.sym
/code/illumos-gate/usr/src/boot/sys/boot/libficl/amd64/.make.state
/code/illumos-gate/usr/src/boot/sys/boot/Makefile.inc
/code/illumos-gate/usr/src/boot/sys/boot/Makefile
/code/illumos-gate/usr/src/boot/sys/boot/.make.state
/code/illumos-gate/usr/src/boot/lib/libstand/zfs/Makefile.inc
tsoome@beastie:/code/illumos-gate/usr/src$

cmp moved object files:
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64$ cmp digest.o /tmp/boot/sys/boot/libcrypto/amd64/digest.o 
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64$ cmp sha1.o /tmp/boot/sys/boot/libcrypto/amd64/sha1.o          
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64$ cmp sha1-x86_64.o /tmp/boot/sys/boot/libcrypto/amd64/sha1-x86_64.o 
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/amd64$ cd ../i386/
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/i386$ cmp digest.o /tmp/boot/sys/boot/libcrypto/i386/digest.o 
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/i386$ cmp sha1.o /tmp/boot/sys/boot/libcrypto/i386/sha1.o 
tsoome@beastie:/code/illumos-gate/usr/src/boot/sys/boot/libstand/i386$ 
Actions #1

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 1472
Actions #2

Updated by Toomas Soome about 2 months ago

  • Description updated (diff)
  • Gerrit CR deleted (1472)
Actions #3

Updated by Toomas Soome about 2 months ago

  • Gerrit CR set to 1472
Actions #4

Updated by Electric Monk about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 411d06f4173dcc82abb7baec9fd0860cde7df236

commit  411d06f4173dcc82abb7baec9fd0860cde7df236
Author: Toomas Soome <tsoome@me.com>
Date:   2021-05-16T18:20:17.000Z

    13785 loader: move libcrypto to libstand
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF