Gurus- Do llvm/llvm-gcc support pragma definitions for visibility like: #pragma GCC visibility push(hidden) If so, what are the options I need to set when configuring llvm and llvm-gcc? 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. Any Inputs, Insights? Thanks in advance, -KC -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090318/90dc994e/attachment.html>
Anton Korobeynikov
2009-Mar-19 08:46 UTC
[LLVMdev] Question about llvm/llvm-gcc visibility
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.> 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
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>
Possibly Parallel Threads
- [LLVMdev] Question about llvm/llvm-gcc visibility
- [llvm-mc] FreeBSD kernel module performance impact when upgrading clang
- [RFC][LLVM] New Constant type for representing function PLT entries
- [RFC][LLVM] New Constant type for representing function PLT entries
- [LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms