search for: gotpcrel

Displaying 20 results from an estimated 45 matches for "gotpcrel".

2018 Apr 23
2
llc tool followed by g++ : Abnormal behavior while compiling assembly to object file
...o convert assembly to object code. llc -march=x86-64 -filetype=asm input.ll -o input.s g++ -g -c -o input.s --input.o inshort ll --> llc --> .s -->g++ -->obj original source was something like this { printf(" **** %s ****",str); } input.s turn out to be movq .str at GOTPCREL(%rip),%rdi movq .str.1 at GOTPCREL(%rip),%rsi xorl %eax,%eax movq %rdi,%r14 callq printf at PLT While at Runtime mov 0x0(%rip),%rdi mov 0x0(%rip),%rsi xor %eax,%eax mov %rdi,%r14 callq printf at PLT Not really sure what happened here? I was expecting at runtime offset for str and str.1 to b...
2011 Aug 05
0
[LLVMdev] RFC: Exception Handling Rewrite
...long L$set$2 # landing pad .byte 0x1 # uleb128 0x1; action .set L$set$3,LEHB1-LFB8 .long L$set$3 # region 1 start .set L$set$4,LEHE1-LEHB1 .long L$set$4 # length .long 0x0 # landing pad .byte 0x0 # uleb128 0x0; action .byte 0x7f # Action record table .byte 0x0 .align 2 .long __ZTI1A+4 at GOTPCREL .byte 0x1 # Exception specification table .byte 0x0 So the call to "foo" is marked as being able to throw an "A" type. (The 0x7f in the action record table is a negative 1-based offset into the exception specification table, which itself is a positive 1-based offset into the...
2010 Dec 15
3
[LLVMdev] opinions on turning on encoding info by default in -S
...-frame-pointer .section __TEXT,__text,regular,pure_instructions .globl _tf_bH .align 4, 0x90 _tf_bH: ## @tf_bH ## BB#0: ## %entry ## kill: RSI<def> ESI<kill> movq _last_tf_arg_u at GOTPCREL(%rip), %rax ## encoding: [0x48,0x8b,0x05,A,A,A,A] ## fixup A - offset: 3, value: _last_tf_arg_u at GOTPCREL-4, kind: reloc_riprel_4byte_movq_load movq %rsi, (%rax) ## encoding: [0x48,0x89,0x30] imull $43691, %esi, %eax ## encoding: [0x69,0...
2018 Apr 23
0
llc tool followed by g++ : Abnormal behavior while compiling assembly to object file
Hi Mahesh, On 23 April 2018 at 10:51, Mahesh Attarde via llvm-dev <llvm-dev at lists.llvm.org> wrote: > movq .str at GOTPCREL(%rip),%rdi > movq .str.1 at GOTPCREL(%rip),%rsi That's quite strange. You wouldn't normally expect to access a constant string via the GOT. It looks like LLVM has decided to put the symbols in an odd section, so it'd be a good idea to make sure your entire triple matches GCC (e.g. -...
2011 Aug 05
3
[LLVMdev] RFC: Exception Handling Rewrite
Bill, ooops, yes, I described the meaning of "throw(A)" backwards, but I still think my example shows why you cannot merge LandingpadInst while inlining because multiple filter-lists on a LandingpadInst don't make sense. Perhaps I'm reading your original spec wrong, perhaps I'm mis-reading Duncan's emails, but I read them to mean that your syntax supports
2017 Oct 05
2
[RFC v3 20/27] x86/ftrace: Adapt function tracing for PIE support
...17 at 6:06 AM, Steven Rostedt <rostedt at goodmis.org> wrote: > On Wed, 4 Oct 2017 14:19:56 -0700 > Thomas Garnier <thgarnie at google.com> wrote: > >> When using -fPIE/PIC with function tracing, the compiler generates a >> call through the GOT (call *__fentry__ at GOTPCREL). This instruction >> takes 6 bytes instead of 5 on the usual relative call. >> >> With this change, function tracing supports 6 bytes on traceable >> function and can still replace relative calls on the ftrace assembly >> functions. >> >> Position Independ...
2017 Oct 05
2
[RFC v3 20/27] x86/ftrace: Adapt function tracing for PIE support
...17 at 6:06 AM, Steven Rostedt <rostedt at goodmis.org> wrote: > On Wed, 4 Oct 2017 14:19:56 -0700 > Thomas Garnier <thgarnie at google.com> wrote: > >> When using -fPIE/PIC with function tracing, the compiler generates a >> call through the GOT (call *__fentry__ at GOTPCREL). This instruction >> takes 6 bytes instead of 5 on the usual relative call. >> >> With this change, function tracing supports 6 bytes on traceable >> function and can still replace relative calls on the ftrace assembly >> functions. >> >> Position Independ...
2010 Dec 16
0
[LLVMdev] opinions on turning on encoding info by default in -S
...XT,__text,regular,pure_instructions > .globl _tf_bH > .align 4, 0x90 > _tf_bH: ## @tf_bH > ## BB#0: ## %entry > ## kill: RSI<def> ESI<kill> > movq _last_tf_arg_u at GOTPCREL(%rip), %rax ## encoding: [0x48,0x8b,0x05,A,A,A,A] > ## fixup A - offset: 3, value: _last_tf_arg_u at GOTPCREL-4, kind: reloc_riprel_4byte_movq_load > movq %rsi, (%rax) ## encoding: [0x48,0x89,0x30] > imull $43691, %esi, %eax ## enc...
2016 Oct 25
3
RFC: Absolute or "fixed address" symbols as immediate operands
...ration as you suggest, this example will compile awkwardly: @foo = external global i8 define i64 @addfoo(i64 %v) { %cast = ptrtoint i8* @foo to i64 %v1 = add i64 %v, %cast ret i64 %v1 } The ideal code is: addfoo: leaq foo(%rdi), %rax retq Today we select: addfoo: addq foo at GOTPCREL(%rip), %rdi movq %rdi, %rax retq We could use attributes to try to convince ISel not to form GlobalAddress nodes, but we might also want to consider just adding a new kind of global. Chris's proposal of giving this new globalconst pointer type seems like a reasonable compro...
2018 May 24
2
[PATCH v3 21/27] x86/ftrace: Adapt function tracing for PIE support
On Wed 2018-05-23 12:54:15, Thomas Garnier wrote: > When using -fPIE/PIC with function tracing, the compiler generates a > call through the GOT (call *__fentry__ at GOTPCREL). This instruction > takes 6 bytes instead of 5 on the usual relative call. > > If PIE is enabled, replace the 6th byte of the GOT call by a 1-byte nop > so ftrace can handle the previous 5-bytes as before. > > Position Independent Executable (PIE) support will allow to extended...
2018 May 24
2
[PATCH v3 21/27] x86/ftrace: Adapt function tracing for PIE support
On Wed 2018-05-23 12:54:15, Thomas Garnier wrote: > When using -fPIE/PIC with function tracing, the compiler generates a > call through the GOT (call *__fentry__ at GOTPCREL). This instruction > takes 6 bytes instead of 5 on the usual relative call. > > If PIE is enabled, replace the 6th byte of the GOT call by a 1-byte nop > so ftrace can handle the previous 5-bytes as before. > > Position Independent Executable (PIE) support will allow to extended...
2018 Sep 22
3
Quick question: How to BuildMI mov64mi32 arbitrary MMB address to memory
Dear Mr. Northover, Thank you for the quick reply. You are correct about the address-mode operands :) . I guess an important detail left out was that the basic block (call it A) that wants to calculate the address of the target stationary trampoline basic block (call it B) will be moved around in memory during run-time. Our earlier solution, before the feature was implemented to move around (A)
2015 Nov 04
2
Vectorizing structure reads, writes, etc on X86-64 AVX
...7.0.0 (clang-700.1.76)], but this looks fixed on trunk. I made a change that comes into play if you don't specify a particular CPU: http://llvm.org/viewvc/llvm-project?view=revision&revision=245950 $ ./clang -O1 -mavx copy.c -S -o - ... movslq %edi, %rax movq _spr_dynamic at GOTPCREL(%rip), %rcx movq (%rcx), %rcx shlq $5, %rax movslq %esi, %rdx movq _spr_static at GOTPCREL(%rip), %rsi movq (%rsi), %rsi shlq $5, %rdx vmovups (%rsi,%rdx), %ymm0 <--- 32-byte load vmovups %ymm0, (%rcx,%rax)...
2017 Aug 04
2
Bug or incorrect use of inline asm?
On Thu, Aug 3, 2017 at 6:19 PM, Tim Northover <t.p.northover at gmail.com> wrote: > 2017-08-03 8:58 GMT-07:00 Johan Engelen via llvm-dev < > llvm-dev at lists.llvm.org>: > > The error is gone after removing (or reducing) the alignment of `%a`. > This > > makes me believe that our inline asm syntax is correct to add an offset > to a > > pointer: "
2018 May 24
1
[PATCH v3 21/27] x86/ftrace: Adapt function tracing for PIE support
...ote: > On Thu, 24 May 2018 13:40:24 +0200 > Petr Mladek <pmladek at suse.com> wrote: > > On Wed 2018-05-23 12:54:15, Thomas Garnier wrote: > > > When using -fPIE/PIC with function tracing, the compiler generates a > > > call through the GOT (call *__fentry__ at GOTPCREL). This instruction > > > takes 6 bytes instead of 5 on the usual relative call. > > > > > > If PIE is enabled, replace the 6th byte of the GOT call by a 1-byte nop > > > so ftrace can handle the previous 5-bytes as before. > > > > > > Position I...
2017 Oct 05
0
[RFC v3 20/27] x86/ftrace: Adapt function tracing for PIE support
On Wed, 4 Oct 2017 14:19:56 -0700 Thomas Garnier <thgarnie at google.com> wrote: > When using -fPIE/PIC with function tracing, the compiler generates a > call through the GOT (call *__fentry__ at GOTPCREL). This instruction > takes 6 bytes instead of 5 on the usual relative call. > > With this change, function tracing supports 6 bytes on traceable > function and can still replace relative calls on the ftrace assembly > functions. > > Position Independent Executable (PIE) suppo...
2017 Oct 05
0
[RFC v3 20/27] x86/ftrace: Adapt function tracing for PIE support
...dt <rostedt at goodmis.org> wrote: > > On Wed, 4 Oct 2017 14:19:56 -0700 > > Thomas Garnier <thgarnie at google.com> wrote: > > > >> When using -fPIE/PIC with function tracing, the compiler generates a > >> call through the GOT (call *__fentry__ at GOTPCREL). This instruction > >> takes 6 bytes instead of 5 on the usual relative call. > >> > >> With this change, function tracing supports 6 bytes on traceable > >> function and can still replace relative calls on the ftrace assembly > >> functions. > >&...
2013 May 14
0
[LLVMdev] Hidden-visibility aliases to default-visibility globals
On Mon, Apr 01, 2013 at 03:49:14PM -0700, Peter Collingbourne wrote: > On Thu, Mar 21, 2013 at 02:12:27PM +0900, Joerg Sonnenberger wrote: > > On Wed, Mar 20, 2013 at 02:22:47PM -0700, Peter Collingbourne wrote: > > > I am trying to compile a dynamic loader using LLVM. Part of the IR > > > for this loader looks like this: > > > > > > @_rtld_local =
2018 May 24
0
[PATCH v3 21/27] x86/ftrace: Adapt function tracing for PIE support
On Thu, 24 May 2018 13:40:24 +0200 Petr Mladek <pmladek at suse.com> wrote: > On Wed 2018-05-23 12:54:15, Thomas Garnier wrote: > > When using -fPIE/PIC with function tracing, the compiler generates a > > call through the GOT (call *__fentry__ at GOTPCREL). This instruction > > takes 6 bytes instead of 5 on the usual relative call. > > > > If PIE is enabled, replace the 6th byte of the GOT call by a 1-byte nop > > so ftrace can handle the previous 5-bytes as before. > > > > Position Independent Executable (PIE)...
2013 Apr 01
2
[LLVMdev] Hidden-visibility aliases to default-visibility globals
On Thu, Mar 21, 2013 at 02:12:27PM +0900, Joerg Sonnenberger wrote: > On Wed, Mar 20, 2013 at 02:22:47PM -0700, Peter Collingbourne wrote: > > I am trying to compile a dynamic loader using LLVM. Part of the IR > > for this loader looks like this: > > > > @_rtld_local = hidden alias %struct.rtld_global* @_rtld_global > > @_rtld_global = unnamed_addr global