2024-07-09 03:27 AM
I'm working on the STM32WL55 Nucleo-64, starting from the LoRaWAN_End_Node.
I performed a hexdump and noticed that the ELF file generated at the end of the compilation process contains a significant recurrence of absolute paths, as shown in the picture below.
I tried using the menu "Properties->Path and Symbols->Includes" to include all the paths through the workspace to avoid the absolute paths.
What did I do wrong? How can I generate an ELF file containing only relative paths?
Thank you in advance.
Solved! Go to Solution.
2024-07-11 09:38 AM
You can strip all debug information from ELF file (but it will be awkward to debug). The first 4 include directories come from the .spec file of the compiler.
2024-07-10 09:39 AM
2024-07-10 10:46 AM
@Feanoer In your screenshot the paths are actually absolute. Because, "/${ProjName}" is a "workspace path".
If these absolute paths are not contained in binary image (are debug information only) - not a problem at all.
2024-07-11 05:38 AM
Ok, thank you. I have corrected the paths in the figure, and now they are indeed no longer called in the .ELF file. The only absolute references still present refer to the Debug folder
and the first 4 external includes,
which actually do not appear in 'Path and Symbol.'
Is there a way to remove these last references?"
2024-07-11 09:38 AM
You can strip all debug information from ELF file (but it will be awkward to debug). The first 4 include directories come from the .spec file of the compiler.
2024-07-18 09:11 AM
What is a way to remove those absolute paths that refer to the debug folders? I'm looking in the project properties, but I still can't avoid them.
2024-07-18 02:44 PM - edited 2024-07-18 02:46 PM
If the absolute paths indeed are in the debug information of the .elf - just run strip --strip-debug on it.
If the paths are in strings (like due to using __FILE__ macro), it will be more complicated.