[LLVMdev] Question about llvm/llvm-gcc visibility

Mark A. Lyan omineo at gmail.com
Thu Mar 19 10:54:47 PDT 2009


On Thu, Mar 19, 2009 at 1:46 AM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> Hi, Mark
>
> > #pragma GCC visibility push(hidden)
> In theory - yes.
>
> > If so, what are the options I need to set when configuring llvm and
> > llvm-gcc?
> Well... No extra options are needed.
>
> > I'm able to compile the module with llvm-gcc (with the above pragma
> > included), but the kernel still rejects the module at load time saying
> the
> > module is compiled with PLT/GOT.
> Visibility != w/o PLT/GOT, it only reduces calls / accesses via PLT/GOT.


I agree, though initially I thought otherwise.

The symbol in question here is a memcpy (introduced by the compiler probably
at codegen) for a "big" copy. The memcpy thus introduced is somehow of type
R_X86_64_PLT32 instead of it being a R_X86_64_PC32. Without the "bad"
memcpy, things seem to work, the module loads and works.

I'll investigate some more and then file a PR. Thanks for your help!

-KC


> > Any Inputs, Insights?
> Please consider filling a PR in llvm bugzilla with sources in question
> and/or generated LLVM IR (you can grab it supplying -emit-llvm option
> to llvm-gcc)
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090319/62c9a20e/attachment.html>


More information about the llvm-dev mailing list