New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variables mixed with a bunch of configuration constants #840
Comments
Yup, they are all symbols as reported by GDB/nm/objdump. What are they? A bit of C code would have helped to see what the declaration(s) look like. Can you attach a tiny executable? |
zephyr.zip :elf && map It seems strange that something like this CONFIG_ARCH is only used in the compilation phase. Why does it appear in global variables? My understanding is that variables should only be placed in the bss and data segments and not elsewhere |
Because objdump reports them as global symbols and no different from a regular global variable.
Not totally true. That is only a convention. You can have multiple bss and data segments and they don't even have to have those names. Try the IAR compiler. However, these variables are marked as 'ABS' and have no size which means we can probably ignore them. |
It is very good if it can be ignored. There are too many such configurations in me, which greatly affects the search for real global variables. |
Do you know what C/C++ construct creates such symbols? Like CONFIG_ARCH for instance. Was it a #define? Or something constant in assembly. I don't have a single executable where I see such symbols. So, no way to test it on the HW I got. |
Try the latest pre-release from the Marketplace, but I do need an answer to the question above. Otherwise, I will remove the potential fix I have in the pre-release. |
I'm using zephyrrtos, he uses kconfig configuration system (same as linux kernel configuration system), when I can configure these macros in the configuration file, then the build system will automatically generate header files for me. My understanding of these will only be expanded during compilation and preprocessing, and the corresponding code will be selected to be compiled, or put into rom I really don't understand why these symbols are needed in the generated elf compiled by gcc, for debugging? or other? ? |
The new preview version looks great to me without a lot of useless symbols |
I probably understand the role of ABS |
What we already knew and was common was this.
What we see new now with whatever version of GCC you are using is this
The What compiler are you using? Are you using GCC or some version of clang? |
I am closing this but you can still report which compiler/version you were using. |
Mixed in a bunch of configuration constants in the global variable display
The extension seems to have no ability to distinguish what is a variable and what is a constant
zephyr.zip
The text was updated successfully, but these errors were encountered: