[Bug uprobes/12851] Wrong section group usage in <sys/sdt.h>
mjw at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Jun 7 13:59:00 GMT 2011
http://sourceware.org/bugzilla/show_bug.cgi?id=12851
--- Comment #3 from Mark Wielaard <mjw at redhat dot com> 2011-06-07 13:59:04 UTC ---
(In reply to comment #2)
> Please build and run "make check" GCC mainline on Fedora 15/x86.
> I see
>
> `_.stapsdt.base' referenced in section `.note.stapsdt' of
> /usr/lib/../lib/libc.a(libc-lowlevellock.o): defined in discarded section
> `.stapsdt.base[.stapsdt.base]' of /usr/lib/../lib/libc.a(bsd-_setjmp.o)
I'll try and replicate. But don't currently have such a setup.
> [hjl@gnu-33 tmp]$ readelf -Sg bsd-_setjmp.o
> There are 14 section headers, starting at offset 0x15c:
>
> Section Headers:
> [Nr] Name Type Addr Off Size ES Flg Lk Inf
> Al
> [...]
> [ 5] .note.stapsdt NOTE 00000000 000078 000040 00 0 0
> 4
> [ 6] .rel.note.stapsdt REL 00000000 000454 000010 08 12 5
> 4
> [ 7] .stapsdt.base PROGBITS 00000000 0000b8 000001 00 AG 0 0
> 1
> [...]
> Key to Flags:
> W (write), A (alloc), X (execute), M (merge), S (strings)
> I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
> O (extra OS processing required) o (OS specific), p (processor specific)
>
> COMDAT group section [ 1] `.group' [.stapsdt.base] contains 1 sections:
> [Index] Name
> [ 7] .stapsdt.base
> [hjl@gnu-33 tmp]$
>
> .stapsdt.base and .note.stapsdt aren't in the same section group.
Why does it matter whether they are in the same section group or not?
.stapsdt.base is in a comdat group, and so one copy will always be retained.
It looks like the linker is picking the wrong section, one that does get
discarded. While ignoring the section that is being kept and should be used to
link against.
I am curious why we haven't seen this before.
Against which binutils/linker is this?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Systemtap
mailing list