This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug ld/12851] --gc-sections doesn't work on comdat sections
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 8 Jun 2011 17:39:47 +0000
- Subject: [Bug ld/12851] --gc-sections doesn't work on comdat sections
- Auto-submitted: auto-generated
- References: <bug-12851-6586@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12851
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Wrong section group usage |--gc-sections doesn't work
|in <sys/sdt.h> |on comdat sections
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-08 17:39:45 UTC ---
[hjl@gnu-6 pr12851]$ make clean
rm -f a.out x
[hjl@gnu-6 pr12851]$ cat foo.s
.section .note.stapsdt,"?","note"
.dc.a _.stapsdt.base
.section .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
_.stapsdt.base: .space 1
.size _.stapsdt.base,1
[hjl@gnu-6 pr12851]$ cat bar.s
.section .note.stapsdt,"?","note"
.dc.a _.stapsdt.base
.section .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
.weak _.stapsdt.base
_.stapsdt.base: .space 1
.size _.stapsdt.base,1
[hjl@gnu-6 pr12851]$ cat start.s
.text
.global start /* Used by SH targets. */
start:
.global _start
_start:
.global __start
__start:
.global main /* Used by HPPA targets. */
main:
.dc.a 0
[hjl@gnu-6 pr12851]$ make x
./ld --gc-sections -o x foo1.o foo2.o start.o
`_.stapsdt.base' referenced in section `.note.stapsdt' of foo1.o: defined in
discarded section `.stapsdt.base[.stapsdt.base]' of foo1.o
`_.stapsdt.base' referenced in section `.note.stapsdt' of foo2.o: defined in
discarded section `.stapsdt.base[.stapsdt.base]' of foo2.o
make: *** [x] Error 1
[hjl@gnu-6 pr12851]$ make y
./ld --gc-sections -o y bar1.o bar2.o start.o
`_.stapsdt.base' referenced in section `.note.stapsdt' of bar1.o: defined in
discarded section `.stapsdt.base[.stapsdt.base]' of bar1.o
`_.stapsdt.base' referenced in section `.note.stapsdt' of bar2.o: defined in
discarded section `.stapsdt.base[.stapsdt.base]' of bar1.o
make: *** [y] Error 1
[hjl@gnu-6 pr12851]$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.