[patch] Hide the stub created for MO_ExternalSymbol too.
Rafael EspĂndola
rafael.espindola at gmail.com
Sun Dec 1 13:48:02 PST 2013
The previous patch had a bug in that it would add the L prefix to the
value used in the .indirect_symbol directive too. The attached patch
has that bug fixed.
On 28 November 2013 15:40, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> 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: 2876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131201/18d15288/attachment.obj>
More information about the llvm-commits
mailing list