bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12851] --gc-sections doesn't work on comdat sections


From: hjl.tools at gmail dot com
Subject: [Bug ld/12851] --gc-sections doesn't work on comdat sections
Date: Wed, 8 Jun 2011 17:40:17 +0000

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 ---
address@hidden pr12851]$ make clean
rm -f a.out x
address@hidden 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
address@hidden 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
address@hidden 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
address@hidden 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
address@hidden 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
address@hidden pr12851]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]