Re: Help required for GCC structure variable assignment optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In this case, can we instruct GCC to not insert memcpy for structure
assignments in the first place?
just leave the structure variable assignment un-optimized?

Is it possible?
I tried with various options like -O0, -fno-builtin, -fno-builtin-function,
-fno-tree-loop-distribute-patterns but memcpy is still inserted by GCC.

--
GampuZ

On Wed, Jul 25, 2018 at 4:26 PM Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx> wrote:

> On 2018-07-25 16:06 +0530, Gampu Z wrote:
> > With -fno-plt, I see that there is reference to
> > *call    *memcpy@GOTPCREL(%rip)*
> >
> > Excuse me if this is stupid question, but is it possible to instruct GCC
> to
> > insert plain memcpy
> > call here? (With no PLT or GOTPCREL or any other relocation)
> >
> > Like this:
> > *call    memcpy*
> > (Similar to the case when -fPIE flag is not specified?)
>
> Static linking.
>
> Even if GCC generate "call memcpy", the *linker* would rewrite
> it to "call memcpy@PLT" or "call *0xabcdef(%rip)".  That's how
> dynamic linking works on modern Linux system.
> --
> Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx>
> School of Aerospace Science and Technology, Xidian University
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux