[llvm-commits] [patch] Fix handling of common symbols

Rafael Espindola espindola at google.com
Mon Sep 13 11:14:51 PDT 2010


The attached patch fixes the included testcase. On ELF common symbols
have to have the section index SHN_COMMON. It looks like this is not
the case on MACHO, but is similar to how absolute symbols are handled.
What this patch does is

* Create a CommonPseudoSection so that we don't end up marking the
symbol as undefined.
* Default the symbol to global. This is what gas does on the attached
testcase, not sure if it is always so.
* Remove some forcing of STB_GLOBAL.
* Add code to handle .local


Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common.patch
Type: text/x-patch
Size: 4627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100913/56faf5d7/attachment.bin>


More information about the llvm-commits mailing list