[cfe-dev] clang and -integrated-as

Jean-Daniel Dupas devlists at shadowlab.org
Sat Apr 17 12:49:52 PDT 2010


Le 17 avr. 2010 à 21:08, Jean-Daniel Dupas a écrit :

> 
> Le 17 avr. 2010 à 20:29, Chris Lattner a écrit :
> 
>> 
>> On Apr 17, 2010, at 5:18 AM, Jean-Daniel Dupas wrote:
>> 
>>> Hello,
>>> 
>>> After the post about LLVM-MC, I tried to play with the "-integrated-as" flag. 
>>> Unfortunately, it does not works for a simple case which is an obj-c file with a class and a category to extend this class (on i386).
>> 
>> It was a known issue, we just didn't get around to addressing it.  Fixed in r101660, thanks for nudging us!
> 
> Thanks for the quick fix :-)

Unfortunately, it does not works as expected. It uncovers an other blocking bug :-(
The assembler generates an undefined symbol instead of generating an absolute symbol for classes, and so, in my test project, it now fails at linking time.

=================
@interface Foo { void *isa; }
@end
@implementation Foo
@end
=================

% clang -arch i386 -c test.m 
% nm -m test.o
00000000 (absolute) external .objc_class_name_Foo

% clang -arch i386 -c test.m -integrated-as
% nm -m test.o 
         (undefined) external .objc_class_name_Foo


-- Jean-Daniel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100417/dd6b37fc/attachment.html>


More information about the cfe-dev mailing list