Hello, we are working on a project to make module debugging for the Linux kernel easier. We want to improve it in such a way that gdb automatically loads the symbols of modules. However, we are facing the following difficulties: gdb needs to know all section of the ELF files. We were told that gcc may produce multiple sections in an ELF binary with the same name (some of them might be empty). This has been observed on the PARISC architecture, however, we were told that it might happen on any architecture when using -ffunction-sections. We could not reproduce it in our tests on x86_64. So, our question is the following: does gcc under any architecture (besides PARISC) produce an ELF binary where the sections' names are not unique?
Thanks!