similar to: [LLVMdev] [lld] ELF needs type for SharedLibraryAtom.

Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] [lld] ELF needs type for SharedLibraryAtom."

2013 Sep 24
4
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On 9/23/2013 7:07 PM, Nick Kledzik wrote: > On Sep 23, 2013, at 4:52 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > >> The following code currently links incorrectly when linking against a dynamic libc on Ubuntu 12.10 unless -fpic is specified. >> >> #include <stdio.h> >> >> int main() { >> fputs("hi\n", stdout); >>
2013 Sep 24
0
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On Sep 23, 2013, at 4:52 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > The following code currently links incorrectly when linking against a dynamic libc on Ubuntu 12.10 unless -fpic is specified. > > #include <stdio.h> > > int main() { > fputs("hi\n", stdout); > } > > The reason is that stdout gets a R_X86_64_PC32 relocation, but is
2013 Sep 24
0
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On Sep 23, 2013, at 7:05 PM, Shankar Easwaran wrote: > On 9/23/2013 7:07 PM, Nick Kledzik wrote: >> On Sep 23, 2013, at 4:52 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: >> >>> The following code currently links incorrectly when linking against a dynamic libc on Ubuntu 12.10 unless -fpic is specified. >>> >>> #include <stdio.h>
2013 Sep 24
0
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On 9/23/2013 9:05 PM, Shankar Easwaran wrote: > On 9/23/2013 7:07 PM, Nick Kledzik wrote: >> On Sep 23, 2013, at 4:52 PM, Michael Spencer <bigcheesegs at gmail.com> >> wrote: >> >>> The following code currently links incorrectly when linking against >>> a dynamic libc on Ubuntu 12.10 unless -fpic is specified. >>> >>> #include
2016 Jun 07
2
[cfe-dev] How to debug if LTO generate wrong code?
On 7 June 2016 at 10:54, Shi, Steven <steven.shi at intel.com> wrote: > Hi Rafael, > I finally enable the clang LTO build with small code model and PIE, and my clang LTO Uefi firmware works now. Thank you! But I have one more issue on the clang normal build (without LTO) now. I find the small code model + "-fpie" build option will let clang generate some R_X86_64_GOTPCREL
2015 Jan 26
2
[LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
Hi Lang, Yeah, I remember this case. Basically what’s happening is that there are relocations for ELF on x86 that use a value that is present in the object image as part of the calculation for the final value that goes in the same location. If you ever find yourself applying relocations for a second time (for instance, because the loaded object location is remapped for out-of-proc execution)
2016 May 31
1
[cfe-dev] How to debug if LTO generate wrong code?
OK, I get it. Adding "-pie" link option can force 64bits relocation address (e.g. EM_X86_64), instead of the 32bits one (e.g. R_X86_64_32S). I only used -fpic and -fpie in clang LTO compile option, and forgot add the "-pie" link option in ld. So my clang + ld LTO executable was still not position independent. Thank you all! Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86
2008 Mar 18
1
Compilation failure
Compilation failure on c/s 17194 is as follows: /root/randy/vtd-stage/xen/common/built_in.o: In function `guest_remove_page'': /root/randy/vtd-stage/xen/common/memory.c:172: undefined reference to `__bitop_bad_size'' /root/randy/vtd-stage/xen/common/memory.c:172: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__bitop_bad_size''
2016 May 31
2
[cfe-dev] How to debug if LTO generate wrong code?
On 31 May 2016 at 01:08, Shi, Steven <steven.shi at intel.com> wrote: > Hi Mehdi, > What's the default code model for x86_64 Mac OS X App? Andrew showed me some example code of Mac OS X App as below, which looks to use the small code model but can run at >4GB high address. Small, but PIC. > For example if you read a global like this the compiler will generate this code.
2011 Jul 08
3
[LLVMdev] [MCJIT] Why does it produce non-PIC ELF code?
ELF that MCJIT writes on x86_64 has relocations in it. Particularly, R_X86_64_PC32 relocations are used for the sections .gcc_except_table and .eh_frame related to exception processing. I am not sure where is general documentation on relocation types, including R_X86_64_PC32. Looks like it's nowhere to be found on the web. But 32-bit relocation can't be used in 64-bit code since it
2014 May 27
2
[LLVMdev] Assertion fails resolving R_X86_64_PC32 relocation
I would think that the R_X86_64_PC32 relocation type should never be generated with large code model since large code model, by definition, makes no assumptions about the size or address of sections. The use of win32-elf might throw a wrinkle into this, since that is a code path that probably isn't exercised much outside of MCJIT use. That said, when this assertion fails it is usually
2018 Jun 05
2
lld mishandling R_X86_64_PC32 relocations
Hi, I've tracked down what I believe is a bug in lld's relocation processing for R_X86_64_PC32 REL relocations. I'm producing the object file in a slightly unusual way: I'm using objcopy on a relocatable i386 ELF object file to convert it to x86_64 which transforms a R_386_PC32 into a R_X86_64_PC32. Steps to reproduce: 1. Assemble the attached bug.asm using nasm and note the
2020 Nov 02
2
[llvm-mc] FreeBSD kernel module performance impact when upgrading clang
Hi, I'm in the process of migrating from clang5 to clang10. Unfortunately clang10 introduced a negative performance impact. The cause is an increase of PLT entries from this patch (first released in clang7): https://bugs.llvm.org/show_bug.cgi?id=36370 https://reviews.llvm.org/D43383 If I revert that clang patch locally, the additional PLT entries and the performance impact disappear. This
2011 Jul 08
0
[LLVMdev] [MCJIT] Why does it produce non-PIC ELF code?
On 07/08/2011 01:25 PM, Yuri wrote: > ELF that MCJIT writes on x86_64 has relocations in it. Particularly, > R_X86_64_PC32 relocations are used for the sections .gcc_except_table > and .eh_frame related to exception processing. > I am not sure where is general documentation on relocation types, > including R_X86_64_PC32. Looks like it's nowhere to be found on the web. > But
2014 May 26
2
[LLVMdev] Assertion fails resolving R_X86_64_PC32 relocation
Hi llvm-community, I use llc (3.4-final) to generate object file: *llc code.bc -mtriple=x86_64-pc-win32-elf -mcpu=x86-64 -filetype=obj -code-model=large -o=code.o* then I load it with *RuntimeDyld + SectionMemoryManager* in my app. I faced the problem described in 15356 <http://llvm.org/bugs/show_bug.cgi?id=15356>bug. Debug assertion fails at
2012 Jul 18
3
[LLVMdev] [lld] Atom object model refactoring.
I've run into some issues with the current atom object model that I would like to fix. The current 4 atoms are not expressive enough. We need to be able to serialize a larger set of atoms, many of which are format specific. The set of common atoms (shared between all formats) should be the set that the resolver requires to work. SharedLibrary is not included in this (by looking at the source
2013 Sep 24
0
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On Sep 24, 2013, at 9:13 AM, Joerg Sonnenberger wrote: > On Tue, Sep 24, 2013 at 10:49:36AM -0500, Shankar Easwaran wrote: >> Not sure why this is being done for a long time with the GNU linker. > > Because the main program is not PIC, it will only use absolute > references to global symbols. For functions, you can create a PLT > record, but for data access, you have to hide
2013 Sep 24
2
[LLVMdev] [lld] ELF needs type for SharedLibraryAtom.
On Tue, Sep 24, 2013 at 10:49:36AM -0500, Shankar Easwaran wrote: > Not sure why this is being done for a long time with the GNU linker. Because the main program is not PIC, it will only use absolute references to global symbols. For functions, you can create a PLT record, but for data access, you have to hide the real symbol and copy the content over to the equivalent in the main binary.
2014 Jan 17
2
[LLVMdev] Offset overflow on calling __chkstc and __alloca
Hi, Attempting to use LLVM in jitting mode for AMD64, we met a problem. When the jitted routine needs a big stack frame (> 1 page), the system attempts to call __chkstk to probe the stack. This attempt results in assertion in RuntimeDyldELF::resolveX86_64Relocation(), case ELF::R_X86_64_PC32, because the RealOffset does not fit in 32 bits. Same happens with __alloca (when
2015 May 07
2
[LLVMdev] [lld] Wrong references for C++ COMDAT groups
Looks like it is also not working on x86_64, using clang/lld I am seeing a segmentation fault: Dump of assembler code for function _Z4funcj: 0x0000000000400590 <+0>: push %rbp 0x0000000000400591 <+1>: push %rbx 0x0000000000400592 <+2>: push %rax 0x0000000000400593 <+3>: mov %edi,%ebp 0x0000000000400595 <+5>: pop %rdx 0x0000000000400596