Notes from the Embedded Systems round table @ Euro LLVM 2024

My notes from memory, please feel free to add anything important I’ve missed out in the thread.

  • Configuration file based multilib
    • General consensus that adding a way for the multilib configuration file to supply its own strings to select on was a reasonable idea. Please send RFC/pull-request.
    • Alternative of selecting based on macro definitions on the command-line -D was considered an interesting idea, but too likely for names to clash accidentally, particulary if regular expressions were involved.
  • LLD and linker scripts
    • Linker script compatibility. Some long tail incompatibilities found that are undocumented. These should be raised as issues.
    • Enhance the lld linker script documentation, particularly useful for Functional Safety users that won’t be able to just refer to the GNU documentation.
    • Raise profile of, and add to, documentation that states differences between GNU ld and lld.
    • Better documentation of the implementation defined cases.
  • Map file enhancements and other diagnostics
    • Why-live to show why a section isn’t removed is a highly desired feature.
    • Some diagnostics can be slow, it is important that those not using them don’t pay the cost.
    • Build system may make more interactive diagnostics like why-live difficult to use as feeding linker flags through a baroque build-sytem can be difficult. Perhaps offer option to pass some command line flags via environment variable.
    • Possibility of outputting a liveness dot-graph format for an external tool to process.
    • General desire for more map file information ([RFC] Improve map-files for effective analysis and debugging). Will need to consider each suggestion to see if it goes in the main map file by default, which is often always switched on for the whole project, or optionally included.
    • Very difficult to find out why lld has made a particular decision due to lack of trace/introspection information. Not practical for an end-user to look at LLD source code or attach a debugger.
    • No desire to see more external dependencies such as protobuf included to output binary map files . JSON is the preferred output format of machine readable diagnostics and this could be further converted by external tools.
  • Linker scripts and LTO
    • Need a more precise definition of what LTO will or will not do with respect to equivalent ELF files.
    • Possibly something akin to the GCC internals document LTO (GNU Compiler Collection (GCC) Internals)
    • fatLTO is good, but it is all or nothing, is there a possibility of using ELF when required, but LTO where possible.
1 Like