[llvm-commits] [llvm] r76971 - /llvm/trunk/lib/Target/TargetAsmInfo.cpp

Rafael Espindola espindola at google.com
Sat Jul 25 03:36:08 PDT 2009


2009/7/24 Chris Lattner <sabre at nondot.org>:
> Author: lattner
> Date: Fri Jul 24 11:40:45 2009
> New Revision: 76971
>
> URL: http://llvm.org/viewvc/llvm-project?rev=76971&view=rev
> Log:
> There is no need to pass the name into  lib/Target/TargetAsmInfo.cpp
> when we have a global with no section explicitly specified.

This is causing problems on linux. Before the patch we would compile a
global "int foo;" into

---------------------------------------
        .type   foo, at object
        .section        .gnu.linkonce.b.foo,"aw", at nobits
        .comm   foo,4,4         # foo
--------------------------------------
and now we generate

--------------------------
        .type   foo, at object
        .section        .gnu.linkonce.b.foo,"aw", at progbits
        .comm   foo,4,4         # foo
--------------------------

The change from @nobits into @progbits causes the assembler to print
this warning:

Warning: setting incorrect section type for .gnu.linkonce.b.foo

I created bug 4619 for this.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047




More information about the llvm-commits mailing list