Skip to content

More aggressive remapping#2442

Open
mkeeter wants to merge 1 commit intomasterfrom
mkeeter/more-aggressive-remapping
Open

More aggressive remapping#2442
mkeeter wants to merge 1 commit intomasterfrom
mkeeter/more-aggressive-remapping

Conversation

@mkeeter
Copy link
Collaborator

@mkeeter mkeeter commented Mar 19, 2026

Looking at our strings, I noticed two things:

  • /toolchain remaps were always of the form /toolchain/lib/rustlib/src/rust/library/core/src
  • There were a bunch of strings of the form /hubris/target/thumbv7em-none-eabihf/release/build, which are files generated from build.rs scripts

This PR remaps those strings more aggressively, to /rustlib and /hubris/build respectively.

This saves 17920 bytes of flash on the cosmo-b-dev image:

auxflash            15936   -> 15864
control_plane_agent 114488  -> 113928
cosmo_seq           43684   -> 38304 (!)
dump_agent          16860   -> 16712
fmc_demo            10312   -> 10236
hash_driver         6984    -> 6912
hf                  34704   -> 34552
hiffy               22568   -> 22416
host_sp_comms       68860   -> 68484
i2c_driver          12192   -> 12156
idle                88      -> 88
ignition_flash      7488    -> 7452
jefe                9184    -> 9184
kernel              32768   -> 32768
net                 74872   -> 74648
packrat             22868   -> 22800
power               34920   -> 34768
rng_driver          5800    -> 5724
sensor              8280    -> 8244
snitch              3340    -> 3340
spartan7_loader     12924   -> 12812
spd                 6788    -> 6712
spi2_driver         11020   -> 10948
spi3_driver         10544   -> 10472
sprot               45252   -> 45172
sys                 2720    -> 2720
thermal             21792   -> 21644
udpbroadcast        6472    -> 6400
udpecho             7008    -> 6972
udprpc              8208    -> 8172
update_server       9292    -> 9252
user_leds           1420    -> 1420
validate            7468    -> 7468
vpd                 5608    -> 5608

(along with #2441, this is a building block for doing wider builds across multiple target directories; we'll need remapping of build directories to generate the same binaries in the end)

@mkeeter mkeeter requested review from hawkw and labbott March 19, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant