Project

General

Profile

Actions

Bug #13816

closed

loader: BIOS build should not use -fPIC

Added by Toomas Soome about 1 year ago. Updated 10 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

BIOS loader has limited memory for program binary, building it with PIC objects is wasting some amount of that memory.

Since BIOS loader is using 32-bit protected mode, it means, we need PIC and non-PIC objects for 32-bit build of loader itself and libficl/libstand libraries. 64-bit objects are only used to build EFI loader.

Before:

tsoome@beastie:/code/illumos-gate/usr/src/boot$ ls -l /code/illumos-gate/proto/root_i386/boot 
total 3484
drwxr-xr-x   3 tsoome   staff          3 May 15 15:25 acpi
-r--r--r--   1 tsoome   staff       1249 May 16 23:11 cdboot
drwxr-xr-x   2 tsoome   staff          2 May 15 16:05 conf.d
drwxr-xr-x   2 tsoome   staff          3 May 15 16:05 defaults
drwxr-xr-x   2 tsoome   staff         24 May 15 15:25 fonts
drwxr-xr-x   2 tsoome   staff         27 May 15 16:05 forth
-r--r--r--   1 tsoome   staff     151552 May 16 23:11 gptzfsboot
drwxr-xr-x   3 tsoome   staff         25 May 15 16:04 grub
-r--r--r--   1 tsoome   staff      37587 May 15 16:05 illumos-brand.png
-r--r--r--   1 tsoome   staff      11979 May 15 16:05 illumos-logo.png
-r--r--r--   1 tsoome   staff      15360 May 16 23:11 isoboot
-r--r--r--   1 tsoome   staff     421888 May 16 23:11 loader
-r--r--r--   1 tsoome   staff      13586 May 15 16:05 loader.help
-r--r--r--   1 tsoome   staff        497 May 15 16:05 loader.rc
-r-xr-xr-x   1 tsoome   staff     537088 May 16 23:11 loader32.efi
-r-xr-xr-x   1 tsoome   staff     595456 May 16 23:11 loader64.efi
-r--r--r--   1 tsoome   staff        512 May 15 16:05 pmbr
-r--r--r--   1 tsoome   staff     422400 May 16 23:11 pxeboot
drwxr-xr-x   4 tsoome   staff          7 May 15 15:54 solaris
-rw-r--r--   2 tsoome   staff     309500 May 15 15:53 solaris.xpm
-rw-r--r--   2 tsoome   staff     309500 May 15 15:53 splashimage.xpm
tsoome@beastie:/code/illumos-gate/usr/src/boot$ 

and after:

tsoome@beastie:/code/illumos-gate/usr/src/boot$ ls -l /code/illumos-gate/proto/root_i386/boot 
total 3427
drwxr-xr-x   3 tsoome   staff          3 May 15 15:25 acpi
-r--r--r--   1 tsoome   staff       1249 May 16 23:16 cdboot
drwxr-xr-x   2 tsoome   staff          2 May 15 16:05 conf.d
drwxr-xr-x   2 tsoome   staff          3 May 15 16:05 defaults
drwxr-xr-x   2 tsoome   staff         24 May 15 15:25 fonts
drwxr-xr-x   2 tsoome   staff         27 May 15 16:05 forth
-r--r--r--   1 tsoome   staff     143872 May 16 23:16 gptzfsboot
drwxr-xr-x   3 tsoome   staff         25 May 15 16:04 grub
-r--r--r--   1 tsoome   staff      37587 May 15 16:05 illumos-brand.png
-r--r--r--   1 tsoome   staff      11979 May 15 16:05 illumos-logo.png
-r--r--r--   1 tsoome   staff      14336 May 16 23:16 isoboot
-r--r--r--   1 tsoome   staff     393216 May 16 23:16 loader
-r--r--r--   1 tsoome   staff      13586 May 15 16:05 loader.help
-r--r--r--   1 tsoome   staff        497 May 15 16:05 loader.rc
-r-xr-xr-x   1 tsoome   staff     537088 May 16 23:16 loader32.efi
-r-xr-xr-x   1 tsoome   staff     595456 May 16 23:16 loader64.efi
-r--r--r--   1 tsoome   staff        512 May 15 16:05 pmbr
-r--r--r--   1 tsoome   staff     393728 May 16 23:16 pxeboot
drwxr-xr-x   4 tsoome   staff          7 May 15 15:54 solaris
-rw-r--r--   2 tsoome   staff     309500 May 15 15:53 solaris.xpm
-rw-r--r--   2 tsoome   staff     309500 May 15 15:53 splashimage.xpm
tsoome@beastie:/code/illumos-gate/usr/src/boot$

Testing done: build/install/boot. So far there seems to be no unexpected issues.

Actions #1

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 1501
Actions #2

Updated by Toomas Soome 10 months ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk 10 months ago

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

git commit ff5d40392f371e5d7648aef49cd3ce3834e48611

commit  ff5d40392f371e5d7648aef49cd3ce3834e48611
Author: Toomas Soome <tsoome@me.com>
Date:   2021-07-27T19:57:17.000Z

    13816 loader: BIOS build should not use -fPIC
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF