Trace back to source names of closures etc from elf symbols

Hello, I want to analyze code size, but in the binary I am getting it looks like this:

gui::main::h840e8d2e04c57b6d                                                                                                                                                                   18684    3.07
threadx_rs::threadx::good_thread::trampoline::h4cc4e69475006c0f                                                                                                                                14040    2.31
<picoserve::routing::Route<PD,Handler,Fallback> as picoserve::routing::PathRouter<State,CurrentPathParameters>>::call_path_router::{{closure}}::hfc94d3412f0a6517                              12628    2.07
<picoserve::routing::Route<PD,Handler,Fallback> as picoserve::routing::PathRouter<State,CurrentPathParameters>>::call_path_router::{{closure}}::h21994b1108d1b37f                              11768    1.93
embassy_executor::raw::TaskStorage<F>::poll::hda57d4d5bcfaae89                                                                                                                                 10744    1.77
threadx_rs::threadx::good_thread::trampoline::hc5291c620f9174fb                                                                                                                                10448    1.72
core::num::dec2flt::table::POWER_OF_FIVE_128::h2974b81840649776                                                                                                                                10416    1.71
heathub_async_blocks::tuya_connection::mqtt_actor::h4a3692b8a2def1cb                                                                                                                            8428    1.38
<picoserve::routing::Route<PD,Handler,Fallback> as picoserve::routing::PathRouter<State,CurrentPathParameters>>::call_path_router::{{closure}}::h6a05c8b2f6f95e63                               8380    1.38
threadx_rs::threadx::good_thread::trampoline::h21a5527e2efba19f                                                                                                                                 6428    1.06
embassy_executor::raw::TaskStorage<F>::poll::h4e27f4f88b6b957d                                                                                                                                  4572    0.75
urtu_application::periodic_process::deserialize_latched::heb622aed894aba6e                                                                                                                      3892    0.64
urtu_threadx::process_handlers::urtu_app_start::h8cd53fa6fb2164ea                                                                                                                               3860    0.63
sha2::sha256::compress256::h19f3ce00c40e062d                                                                                                                                                    3272    0.54
<native_blocks::app_regulator::Block as native_blocks::NativeBlock>::step::h7b5731000f77f779                                                                                                2932    0.48

As you can see, it is impossible to locate, where they are coming from, so I can't even debug their sizes etc. Is there any way to get the code locations? Ideally I would like for rustc to include locations into symbol names...

In theory it should be possible to use debug info to see where the code in each function comes from.

Maybe try cargo asm --rust.

Alternatively, if it's about tracking the code in the closures, then you could try to move as much code as you can out of closures into calls to #[inline(never)] functions.