On Sat, Apr 6, 2013 at 3:09 AM, Sebastian Wankerl
<sisew...@cip.cs.fau.de> wrote:
>
> 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?

Why do you care?  To care whether there are duplicate section names
suggests that you are doing something wrong.

That said, since you mention Linux kernel modules I'm guessing that
you are looking at objects linked using -r.  Offhand I can't think of
a way to get duplicate section names after linking with -r, because
the linker will tend to agglomerate sections with the same name.

Ian

Reply via email to