2025-09-11
Agenda
-
Code reviews and RFCs:
- See RFC below for PRs.
-
Stack memory usage analysis for embedded devices: tools, gaps, ideas.
-
Community:
- Dev Meeting workshop preparation.
Discussion
Reviews
-
The “includes” review ([Multilib] Extend the Multilib system to support an IncludeDirs field. by simpal01 · Pull Request #146651 · llvm/llvm-project · GitHub): Arm team is analyzing possible impact if clang-runtimes is not used and will get back soon.
-
Please see PRs linked from the RFC below.
Call stack analysis
-
Prabhu posted a relevant RFC: [RFC] Call Graph Information from Clang/LLVM for C/C++
-
The RFC is based on a previous one from ~2021: updated with few changes based on feedback.
-
LLVM changes landed to handle metadata, other PRs a linked in the RFC.
-
-
How to handle multiple related sections?
-
There are multiple sections (one per obj file) then one section per binary.
-
Template instantiations in multiple files - linker will select only one of them, if one call graph section per module, then many of these template will be eliminated, resulting in dangling references.
-
One call graph section per input section would be in the same COMDAT group as template.
-
Link order is used now to resolve this.
-
Petr: There was a similar issue for dead code and sanitizer metadata. How to mark associated sections to the linker? Solutions:
-
Link order is one mechanism. Is used in PGO has limitations and was not possible to use for sanitizers.
-
Zero flags section groups - all these sections should be dropped as a unit. Seems to be better fit. Works for ELF and COFF too.
-
-
-
llvm-readelf vs llvm-objdump
-
Both are possible, multiple sources of info are needed.
-
llvm-readelf implementation is simpler.
-
Disassembly and other complexity of analysis can be moved out to an external tool.
-
-
RTOS: a flag for FP usage in interrupts
-
llvm-objdump can disassemble up to MCInstr that should ideally have a flag for FP usage, then generate per function in tools output.
-
Idea is to have a modular script that can be extended with extra features like this.
-
Dev Meeting Preparation
-
Schedule: runtimes workshop in the morning, then embedded in the afternoon. Generic libc topics to be covered in runtimes workshop.
-
Format for the embedded workshop.
- Last year there were 3 parts: introduction, talks and discussion topics. Feedback was that people liked introduction (so keep), but there was a lack of time to dive into interesting topics in the discussion section - should we only do introduction and discussion?
-
Suggestion to ask for talks ideas on Discourse, we can use talks to kicking off discussions on the topic. Make it more similar to “birds of feather” sessions from the past: there were a few slides to introduce the topic before the discussion.
-
There will be a post on Discourse for workshop preparation, we can include a form to collect ideas for topics.
-
We may include and discuss some “future” topics that no one has time to work on yet: multithreading, PIC, ASan, etc.
AOB
Petr atomics on Armv6-M
-
Raspberry Pi Pico has two Cortex-M0 cores, but Cortex-M0 does not have any atomic operations, thus for std::atomic compiler generates calls to libatomics.
-
Pico sdk and pigweed provided libatomic calls.
-
Other people are asking about the same and copy the implementation around - should we contribute it into compiler_rt?
-
There is atomics implementation in compiler_rt for POSIX, but not embedded.
-
Arm to review the changes!
-
Peter: Armv6-M does not have atomic instructions, the way around is to disable interrupts that may cause problems with permissions - was difficult to upstream in the past. May need an option to enable this feature from an application code. Let us discuss the details in the PR.
Daniel stdio
- Discussed the RFC on stdio in libc - will respond.