This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16276] G++ generates local references to linkonce sections


------- Additional Comments From hjl at lucon dot org  2004-07-08 17:50 -------
I assume you compiled your testcase with gcc 3.3, which doesn't have my
fix. I looked at the assembly output and I found the problem. We are
generating

     .section        .gnu.linkonce.t.foo
   ...
.L1:
   ...
.L2:
   ...
.L3:
   ...
.L4:
   ...
        jmp     *.L5(,%esi,4)
        .section        .rodata
        .align 4
        .align 4
.L5:
        .long   .L1
        .long   .L2
        .long   .L3
        .long   .L4

Now if .gnu.linkonce.t.foo is discarded, we have undefined references in
.rodata. One way to solve it is not to use .rodata. I think the best way
to solve it is to use comdat group.

BTW, I think you should open a new bug report and provide a testcase for
gcc 3.4.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16276


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]