[patch] Hide the stub created for MO_ExternalSymbol too.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Nov 28 12:40:02 PST 2013


I noticed that given

declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1)
declare void @foo()
define void @bar() {
  call void @foo()
  call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i32 1, i1 false)
  ret void
}

We produce for 32 bit mach-o:

L_foo$stub:
        .indirect_symbol        _foo
        .ascii  "\364\364\364\364\364"

_memset$stub:
        .indirect_symbol        _memset
        .ascii  "\364\364\364\364\364"

I.E., for foo we hide the stub, but for memset we do not. This is
almost certainly a bug since from the linker perspective it shouldn't
matter if the undefined reference was created in LLVM's codegen or
not.

The attached patch fixes it.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 1969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131128/62a86e29/attachment.obj>


More information about the llvm-commits mailing list